} A Subscriber wrapping the (partially defined)
- * Observer represented by the given arguments.
- */
- Subscriber.create = function (next, error, complete) {
- var subscriber = new Subscriber(next, error, complete);
- subscriber.syncErrorThrowable = false;
- return subscriber;
- };
- /**
- * The {@link Observer} callback to receive notifications of type `next` from
- * the Observable, with a value. The Observable may call this method 0 or more
- * times.
- * @param {T} [value] The `next` value.
- * @return {void}
- */
- Subscriber.prototype.next = function (value) {
- if (!this.isStopped) {
- this._next(value);
- }
- };
- /**
- * The {@link Observer} callback to receive notifications of type `error` from
- * the Observable, with an attached {@link Error}. Notifies the Observer that
- * the Observable has experienced an error condition.
- * @param {any} [err] The `error` exception.
- * @return {void}
- */
- Subscriber.prototype.error = function (err) {
- if (!this.isStopped) {
- this.isStopped = true;
- this._error(err);
- }
- };
- /**
- * The {@link Observer} callback to receive a valueless notification of type
- * `complete` from the Observable. Notifies the Observer that the Observable
- * has finished sending push-based notifications.
- * @return {void}
- */
- Subscriber.prototype.complete = function () {
- if (!this.isStopped) {
- this.isStopped = true;
- this._complete();
- }
- };
- Subscriber.prototype.unsubscribe = function () {
- if (this.closed) {
- return;
- }
- this.isStopped = true;
- _super.prototype.unsubscribe.call(this);
- };
- Subscriber.prototype._next = function (value) {
- this.destination.next(value);
- };
- Subscriber.prototype._error = function (err) {
- this.destination.error(err);
- this.unsubscribe();
- };
- Subscriber.prototype._complete = function () {
- this.destination.complete();
- this.unsubscribe();
- };
- Subscriber.prototype._unsubscribeAndRecycle = function () {
- var _a = this, _parent = _a._parent, _parents = _a._parents;
- this._parent = null;
- this._parents = null;
- this.unsubscribe();
- this.closed = false;
- this.isStopped = false;
- this._parent = _parent;
- this._parents = _parents;
- return this;
- };
- return Subscriber;
-}(Subscription_1.Subscription));
-exports.Subscriber = Subscriber;
-/**
- * We need this JSDoc comment for affecting ESDoc.
- * @ignore
- * @extends {Ignored}
- */
-var SafeSubscriber = (function (_super) {
- __extends(SafeSubscriber, _super);
- function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {
- _super.call(this);
- this._parentSubscriber = _parentSubscriber;
- var next;
- var context = this;
- if (isFunction_1.isFunction(observerOrNext)) {
- next = observerOrNext;
- }
- else if (observerOrNext) {
- context = observerOrNext;
- next = observerOrNext.next;
- error = observerOrNext.error;
- complete = observerOrNext.complete;
- if (isFunction_1.isFunction(context.unsubscribe)) {
- this.add(context.unsubscribe.bind(context));
- }
- context.unsubscribe = this.unsubscribe.bind(this);
- }
- this._context = context;
- this._next = next;
- this._error = error;
- this._complete = complete;
- }
- SafeSubscriber.prototype.next = function (value) {
- if (!this.isStopped && this._next) {
- var _parentSubscriber = this._parentSubscriber;
- if (!_parentSubscriber.syncErrorThrowable) {
- this.__tryOrUnsub(this._next, value);
- }
- else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {
- this.unsubscribe();
- }
- }
- };
- SafeSubscriber.prototype.error = function (err) {
- if (!this.isStopped) {
- var _parentSubscriber = this._parentSubscriber;
- if (this._error) {
- if (!_parentSubscriber.syncErrorThrowable) {
- this.__tryOrUnsub(this._error, err);
- this.unsubscribe();
- }
- else {
- this.__tryOrSetError(_parentSubscriber, this._error, err);
- this.unsubscribe();
- }
- }
- else if (!_parentSubscriber.syncErrorThrowable) {
- this.unsubscribe();
- throw err;
- }
- else {
- _parentSubscriber.syncErrorValue = err;
- _parentSubscriber.syncErrorThrown = true;
- this.unsubscribe();
- }
- }
- };
- SafeSubscriber.prototype.complete = function () {
- if (!this.isStopped) {
- var _parentSubscriber = this._parentSubscriber;
- if (this._complete) {
- if (!_parentSubscriber.syncErrorThrowable) {
- this.__tryOrUnsub(this._complete);
- this.unsubscribe();
- }
- else {
- this.__tryOrSetError(_parentSubscriber, this._complete);
- this.unsubscribe();
- }
- }
- else {
- this.unsubscribe();
- }
- }
- };
- SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {
- try {
- fn.call(this._context, value);
- }
- catch (err) {
- this.unsubscribe();
- throw err;
- }
- };
- SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {
- try {
- fn.call(this._context, value);
- }
- catch (err) {
- parent.syncErrorValue = err;
- parent.syncErrorThrown = true;
- return true;
- }
- return false;
- };
- SafeSubscriber.prototype._unsubscribe = function () {
- var _parentSubscriber = this._parentSubscriber;
- this._context = null;
- this._parentSubscriber = null;
- _parentSubscriber.unsubscribe();
+ toBoolean = function (value) {
+ var v;
+ if (value && value.length !== 0) {
+ v = value.toLowerCase();
+ value = !(v === 'f' || v === '0' || v === 'false');
+ } else {
+ value = false;
+ }
+
+ return value;
+ },
+
+ getAttributeValue = function (el, attrName) {
+ var val;
+
+ if (el !== undefined) {
+ val = el.attr(attrName) || el.attr('data-' + attrName);
+ }
+
+ return val;
+ },
+
+ attributeExists = function (el, attrName) {
+ var exists;
+
+ if (el !== undefined) {
+ exists = el.attr(attrName) !== undefined || el.attr('data-' + attrName) !== undefined;
+ }
+
+ return exists;
+ },
+
+ getBooleanAttributeValue = function (el, attrName) {
+ return toBoolean(getAttributeValue(el, attrName));
+ },
+
+ validElementStylingEnabled = function (el) {
+ return enableValidElementStyling && !getBooleanAttributeValue(el, 'disable-valid-styling');
+ },
+
+ autoValidateEnabledOnControl = function (el) {
+ return !getBooleanAttributeValue(el, 'disable-auto-validate');
+ },
+
+ invalidElementStylingEnabled = function (el) {
+ return enableInvalidElementStyling && !getBooleanAttributeValue(el, 'disable-invalid-styling');
};
- return SafeSubscriber;
-}(Subscriber));
-//# sourceMappingURL=Subscriber.js.map
-/***/ }),
-/* 4 */,
-/* 5 */,
-/* 6 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ /**
+ * @ngdoc function
+ * @name validator#enable
+ * @methodOf validator
+ *
+ * @description
+ * By default auto validate will validate all forms and elements with an ngModel directive on. By
+ * setting enabled to false you will explicitly have to opt in to enable validation on forms and child
+ * elements.
+ *
+ * Note: this can be overridden by add the 'auto-validate-enabled="true/false' attribute to a form.
+ *
+ * Example:
+ *
+ * app.config(function (validator) {
+ * validator.enable(false);
+ * });
+ *
+ *
+ * @param {Boolean} isEnabled true to enable, false to disable.
+ */
+ this.enable = function (isEnabled) {
+ validationEnabled = isEnabled;
+ };
-"use strict";
-/* WEBPACK VAR INJECTION */(function(global) {/* unused harmony export scheduleMicroTask */
-/* unused harmony export global */
-/* unused harmony export getTypeNameForDebugging */
-/* harmony export (immutable) */ __webpack_exports__["c"] = isPresent;
-/* harmony export (immutable) */ __webpack_exports__["d"] = isBlank;
-/* harmony export (immutable) */ __webpack_exports__["a"] = isStrictStringMap;
-/* harmony export (immutable) */ __webpack_exports__["e"] = stringify;
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return NumberWrapper; });
-/* unused harmony export looseIdentical */
-/* harmony export (immutable) */ __webpack_exports__["f"] = isJsObject;
-/* unused harmony export print */
-/* unused harmony export warn */
-/* unused harmony export setValueOnPath */
-/* harmony export (immutable) */ __webpack_exports__["g"] = getSymbolIterator;
-/* harmony export (immutable) */ __webpack_exports__["b"] = isPrimitive;
-/* harmony export (immutable) */ __webpack_exports__["h"] = escapeRegExp;
-/**
- * @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 /** @type {?} */ globalScope;
-if (typeof window === 'undefined') {
- if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) {
- // TODO: Replace any with WorkerGlobalScope from lib.webworker.d.ts #3492
- globalScope = (self);
- }
- else {
- globalScope = (global);
- }
-}
-else {
- globalScope = (window);
-}
-/**
- * @param {?} fn
- * @return {?}
- */
-function scheduleMicroTask(fn) {
- Zone.current.scheduleMicroTask('scheduleMicrotask', fn);
-}
-// Need to declare a new variable for global here since TypeScript
-// exports the original value of the symbol.
-var /** @type {?} */ _global = globalScope;
+ /**
+ * @ngdoc function
+ * @name validator#isEnabled
+ * @methodOf validator
+ *
+ * @description
+ * Returns true if the library is enabeld.
+ *
+ * @return {Boolean} true if enabled, otherwise false.
+ */
+ this.isEnabled = function () {
+ return validationEnabled;
+ };
-/**
- * @param {?} type
- * @return {?}
- */
-function getTypeNameForDebugging(type) {
- return type['name'] || typeof type;
-}
-// TODO: remove calls to assert in production environment
-// Note: Can't just export this and import in in other files
-// as `assert` is a reserved keyword in Dart
-_global.assert = function assert(condition) {
- // TODO: to be fixed properly via #2830, noop for now
-};
-/**
- * @param {?} obj
- * @return {?}
- */
-function isPresent(obj) {
- return obj != null;
-}
-/**
- * @param {?} obj
- * @return {?}
- */
-function isBlank(obj) {
- return obj == null;
-}
-var /** @type {?} */ STRING_MAP_PROTO = Object.getPrototypeOf({});
-/**
- * @param {?} obj
- * @return {?}
- */
-function isStrictStringMap(obj) {
- return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;
-}
-/**
- * @param {?} token
- * @return {?}
- */
-function stringify(token) {
- if (typeof token === 'string') {
- return token;
+ /**
+ * @ngdoc function
+ * @name validator#setDefaultElementModifier
+ * @methodOf validator
+ *
+ * @description
+ * Sets the default element modifier that will be used by the validator
+ * to change an elements UI state. Please ensure the modifier has been registered
+ * before setting it as default.
+ *
+ * Note: this can be changed by setting the
+ * element modifier attribute on the input element 'data-element-modifier="myCustomModifier"'
+ *
+ * Example:
+ *
+ * app.config(function (validator) {
+ * validator.setDefaultElementModifier('myCustomModifier');
+ * });
+ *
+ *
+ * @param {string} key The key name of the modifier.
+ */
+ this.setDefaultElementModifier = function (key) {
+ if (elementStateModifiers[key] === undefined) {
+ throw new Error('Element modifier not registered: ' + key);
}
- if (token == null) {
- return '' + token;
+
+ this.defaultElementModifier = key;
+ };
+
+ /**
+ * @ngdoc function
+ * @name validator#registerDomModifier
+ * @methodOf validator
+ *
+ * @description
+ * Registers an object that adheres to the elementModifier interface and is
+ * able to modifier an elements dom so that appears valid / invalid for a specific
+ * scenario i.e. the Twitter Bootstrap css framework, Foundation CSS framework etc.
+ *
+ * Example:
+ *
+ * app.config(function (validator) {
+ * validator.registerDomModifier('customDomModifier', {
+ * makeValid: function (el) {
+ * el.removeClass(el, 'invalid');
+ * el.addClass(el, 'valid');
+ * },
+ * makeInvalid: function (el, err, domManipulator) {
+ * el.removeClass(el, 'valid');
+ * el.addClass(el, 'invalid');
+ * }
+ * });
+ * });
+ *
+ *
+ * @param {string} key The key name of the modifier
+ * @param {object} modifier An object which implements the elementModifier interface
+ */
+ this.registerDomModifier = function (key, modifier) {
+ elementStateModifiers[key] = modifier;
+ };
+
+ /**
+ * @ngdoc function
+ * @name validator#setErrorMessageResolver
+ * @methodOf validator
+ *
+ * @description
+ * Registers an object that adheres to the elementModifier interface and is
+ * able to modifier an elements dom so that appears valid / invalid for a specific
+ * scenario i.e. the Twitter Bootstrap css framework, Foundation CSS framework etc.
+ *
+ * Example:
+ *
+ * app.config(function (validator) {
+ * validator.setErrorMessageResolver(function (errorKey, el) {
+ * var defer = $q.defer();
+ * // resolve the correct error from the given key and resolve the returned promise.
+ * return defer.promise();
+ * });
+ * });
+ *
+ *
+ * @param {function} resolver A method that returns a promise with the resolved error message in.
+ */
+ this.setErrorMessageResolver = function (resolver) {
+ this.errorMessageResolver = resolver;
+ };
+
+ /**
+ * @ngdoc function
+ * @name validator#getErrorMessage
+ * @methodOf validator
+ *
+ * @description
+ * Resolves the error message for the given error type.
+ *
+ * @param {String} errorKey The error type.
+ * @param {Element} el The UI element that is the focus of the error.
+ * It is provided as the error message may need information from the element i.e. ng-min (the min allowed value).
+ */
+ this.getErrorMessage = function (errorKey, el) {
+ var defer;
+ if (this.errorMessageResolver === undefined) {
+ throw new Error('Please set an error message resolver via the setErrorMessageResolver function before attempting to resolve an error message.');
}
- if (token.overriddenName) {
- return "" + token.overriddenName;
+
+ if (attributeExists(el, 'disable-validation-message')) {
+ defer = angular.injector(['ng']).get('$q').defer();
+ defer.resolve('');
+ return defer.promise;
+ } else {
+ return this.errorMessageResolver(errorKey, el);
}
- if (token.name) {
- return "" + token.name;
+ };
+
+ /**
+ * @ngdoc function
+ * @name validator#setValidElementStyling
+ * @methodOf validator
+ *
+ * @description
+ * Globally enables valid element visual styling. This is enabled by default.
+ *
+ * @param {Boolean} enabled True to enable style otherwise false.
+ */
+ this.setValidElementStyling = function (enabled) {
+ enableValidElementStyling = enabled;
+ };
+
+ /**
+ * @ngdoc function
+ * @name validator#setInvalidElementStyling
+ * @methodOf validator
+ *
+ * @description
+ * Globally enables invalid element visual styling. This is enabled by default.
+ *
+ * @param {Boolean} enabled True to enable style otherwise false.
+ */
+ this.setInvalidElementStyling = function (enabled) {
+ enableInvalidElementStyling = enabled;
+ };
+
+ this.getDomModifier = function (el) {
+ var modifierKey = (el !== undefined ? el.attr('element-modifier') : this.defaultElementModifier) ||
+ (el !== undefined ? el.attr('data-element-modifier') : this.defaultElementModifier) ||
+ this.defaultElementModifier;
+
+ if (modifierKey === undefined) {
+ throw new Error('Please set a default dom modifier via the setDefaultElementModifier method on the validator class.');
}
- var /** @type {?} */ res = token.toString();
- var /** @type {?} */ newLineIndex = res.indexOf('\n');
- return newLineIndex === -1 ? res : res.substring(0, newLineIndex);
-}
-var NumberWrapper = (function () {
- function NumberWrapper() {
+
+ return elementStateModifiers[modifierKey];
+ };
+
+ this.makeValid = function (el) {
+ if (autoValidateEnabledOnControl(el)) {
+ if (validElementStylingEnabled(el)) {
+ this.getDomModifier(el).makeValid(el);
+ } else {
+ this.makeDefault(el);
+ }
}
- /**
- * @param {?} text
- * @return {?}
- */
- NumberWrapper.parseIntAutoRadix = function (text) {
- var /** @type {?} */ result = parseInt(text);
- if (isNaN(result)) {
- throw new Error('Invalid integer literal when parsing ' + text);
- }
- return result;
- };
- /**
- * @param {?} value
- * @return {?}
- */
- NumberWrapper.isNumeric = function (value) { return !isNaN(value - parseFloat(value)); };
- return NumberWrapper;
-}());
-/**
- * @param {?} a
- * @param {?} b
- * @return {?}
- */
-function looseIdentical(a, b) {
- return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);
-}
-/**
- * @param {?} o
- * @return {?}
- */
-function isJsObject(o) {
- return o !== null && (typeof o === 'function' || typeof o === 'object');
-}
-/**
- * @param {?} obj
- * @return {?}
- */
-function print(obj) {
- // tslint:disable-next-line:no-console
- console.log(obj);
-}
-/**
- * @param {?} obj
- * @return {?}
- */
-function warn(obj) {
- console.warn(obj);
-}
-/**
- * @param {?} global
- * @param {?} path
- * @param {?} value
- * @return {?}
- */
-function setValueOnPath(global, path, value) {
- var /** @type {?} */ parts = path.split('.');
- var /** @type {?} */ obj = global;
- while (parts.length > 1) {
- var /** @type {?} */ name_1 = parts.shift();
- if (obj.hasOwnProperty(name_1) && obj[name_1] != null) {
- obj = obj[name_1];
- }
- else {
- obj = obj[name_1] = {};
- }
+ };
+
+ this.makeInvalid = function (el, errorMsg) {
+ if (autoValidateEnabledOnControl(el)) {
+ if (invalidElementStylingEnabled(el)) {
+ this.getDomModifier(el).makeInvalid(el, errorMsg);
+ } else {
+ this.makeDefault(el);
+ }
}
- if (obj === undefined || obj === null) {
- obj = {};
+ };
+
+ this.makeDefault = function (el) {
+ if (autoValidateEnabledOnControl(el)) {
+ var dm = this.getDomModifier(el);
+ if (dm.makeDefault) {
+ dm.makeDefault(el);
+ }
}
- obj[parts.shift()] = value;
-}
-var /** @type {?} */ _symbolIterator = null;
-/**
- * @return {?}
- */
-function getSymbolIterator() {
- if (!_symbolIterator) {
- if (((globalScope)).Symbol && Symbol.iterator) {
- _symbolIterator = Symbol.iterator;
- }
- else {
- // es6-shim specific logic
- var /** @type {?} */ keys = Object.getOwnPropertyNames(Map.prototype);
- for (var /** @type {?} */ i = 0; i < keys.length; ++i) {
- var /** @type {?} */ key = keys[i];
- if (key !== 'entries' && key !== 'size' &&
- ((Map)).prototype[key] === Map.prototype['entries']) {
- _symbolIterator = key;
- }
- }
- }
+ };
+
+ this.defaultFormValidationOptions = {
+ forceValidation: false,
+ disabled: false,
+ validateNonVisibleControls: false,
+ removeExternalValidationErrorsOnSubmit: true,
+ validateOnFormSubmit: false
+ };
+
+ this.$get = [
+ function () {
+ return this;
}
- return _symbolIterator;
-}
-/**
- * @param {?} obj
- * @return {?}
- */
-function isPrimitive(obj) {
- return !isJsObject(obj);
-}
-/**
- * @param {?} s
- * @return {?}
- */
-function escapeRegExp(s) {
- return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
+ ];
}
-//# sourceMappingURL=lang.js.map
-/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(53)))
-/***/ }),
-/* 7 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (immutable) */ __webpack_exports__["a"] = scheduleMicroTask;
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return _global; });
-/* harmony export (immutable) */ __webpack_exports__["l"] = getTypeNameForDebugging;
-/* harmony export (immutable) */ __webpack_exports__["b"] = isPresent;
-/* harmony export (immutable) */ __webpack_exports__["k"] = isBlank;
-/* unused harmony export isStrictStringMap */
-/* harmony export (immutable) */ __webpack_exports__["c"] = stringify;
-/* unused harmony export NumberWrapper */
-/* harmony export (immutable) */ __webpack_exports__["j"] = looseIdentical;
-/* harmony export (immutable) */ __webpack_exports__["e"] = isJsObject;
-/* harmony export (immutable) */ __webpack_exports__["g"] = print;
-/* harmony export (immutable) */ __webpack_exports__["h"] = warn;
-/* unused harmony export setValueOnPath */
-/* harmony export (immutable) */ __webpack_exports__["f"] = getSymbolIterator;
-/* harmony export (immutable) */ __webpack_exports__["i"] = isPrimitive;
-/* unused harmony export escapeRegExp */
-/**
- * @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 /** @type {?} */ globalScope;
-if (typeof window === 'undefined') {
- if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) {
- // TODO: Replace any with WorkerGlobalScope from lib.webworker.d.ts #3492
- globalScope = (self);
- }
- else {
- globalScope = (global);
- }
-}
-else {
- globalScope = (window);
-}
-/**
- * @param {?} fn
- * @return {?}
- */
-function scheduleMicroTask(fn) {
- Zone.current.scheduleMicroTask('scheduleMicrotask', fn);
-}
-// Need to declare a new variable for global here since TypeScript
-// exports the original value of the symbol.
-var /** @type {?} */ _global = globalScope;
+angular.module('jcs-autoValidate').provider('validator', ValidatorFn);
-/**
- * @param {?} type
- * @return {?}
- */
-function getTypeNameForDebugging(type) {
- return type['name'] || typeof type;
-}
-// TODO: remove calls to assert in production environment
-// Note: Can't just export this and import in in other files
-// as `assert` is a reserved keyword in Dart
-_global.assert = function assert(condition) {
- // TODO: to be fixed properly via #2830, noop for now
-};
-/**
- * @param {?} obj
- * @return {?}
- */
-function isPresent(obj) {
- return obj != null;
-}
-/**
- * @param {?} obj
- * @return {?}
- */
-function isBlank(obj) {
- return obj == null;
-}
-var /** @type {?} */ STRING_MAP_PROTO = Object.getPrototypeOf({});
-/**
- * @param {?} obj
- * @return {?}
- */
-function isStrictStringMap(obj) {
- return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;
-}
-/**
- * @param {?} token
- * @return {?}
- */
-function stringify(token) {
- if (typeof token === 'string') {
- return token;
- }
- if (token == null) {
- return '' + token;
- }
- if (token.overriddenName) {
- return "" + token.overriddenName;
- }
- if (token.name) {
- return "" + token.name;
- }
- var /** @type {?} */ res = token.toString();
- var /** @type {?} */ newLineIndex = res.indexOf('\n');
- return newLineIndex === -1 ? res : res.substring(0, newLineIndex);
-}
-var NumberWrapper = (function () {
- function NumberWrapper() {
- }
- /**
- * @param {?} text
- * @return {?}
- */
- NumberWrapper.parseIntAutoRadix = function (text) {
- var /** @type {?} */ result = parseInt(text);
- if (isNaN(result)) {
- throw new Error('Invalid integer literal when parsing ' + text);
- }
- return result;
- };
- /**
- * @param {?} value
- * @return {?}
- */
- NumberWrapper.isNumeric = function (value) { return !isNaN(value - parseFloat(value)); };
- return NumberWrapper;
-}());
-/**
- * @param {?} a
- * @param {?} b
- * @return {?}
- */
-function looseIdentical(a, b) {
- return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);
-}
-/**
- * @param {?} o
- * @return {?}
- */
-function isJsObject(o) {
- return o !== null && (typeof o === 'function' || typeof o === 'object');
-}
-/**
- * @param {?} obj
- * @return {?}
- */
-function print(obj) {
- // tslint:disable-next-line:no-console
- console.log(obj);
-}
-/**
- * @param {?} obj
- * @return {?}
- */
-function warn(obj) {
- console.warn(obj);
-}
-/**
- * @param {?} global
- * @param {?} path
- * @param {?} value
- * @return {?}
- */
-function setValueOnPath(global, path, value) {
- var /** @type {?} */ parts = path.split('.');
- var /** @type {?} */ obj = global;
- while (parts.length > 1) {
- var /** @type {?} */ name_1 = parts.shift();
- if (obj.hasOwnProperty(name_1) && obj[name_1] != null) {
- obj = obj[name_1];
- }
- else {
- obj = obj[name_1] = {};
+function Bootstrap3ElementModifierFn($log) {
+ var reset = function (el) {
+ angular.forEach(el.find('span'), function (spanEl) {
+ spanEl = angular.element(spanEl);
+ if (spanEl.hasClass('error-msg') || spanEl.hasClass('form-control-feedback') || spanEl.hasClass('control-feedback')) {
+ spanEl.remove();
}
- }
- if (obj === undefined || obj === null) {
- obj = {};
- }
- obj[parts.shift()] = value;
-}
-var /** @type {?} */ _symbolIterator = null;
-/**
- * @return {?}
- */
-function getSymbolIterator() {
- if (!_symbolIterator) {
- if (((globalScope)).Symbol && Symbol.iterator) {
- _symbolIterator = Symbol.iterator;
- }
- else {
- // es6-shim specific logic
- var /** @type {?} */ keys = Object.getOwnPropertyNames(Map.prototype);
- for (var /** @type {?} */ i = 0; i < keys.length; ++i) {
- var /** @type {?} */ key = keys[i];
- if (key !== 'entries' && key !== 'size' &&
- ((Map)).prototype[key] === Map.prototype['entries']) {
- _symbolIterator = key;
- }
- }
+ });
+
+ el.removeClass('has-success has-error has-feedback');
+ },
+ findWithClassElementAsc = function (el, klass) {
+ var returnEl,
+ parent = el;
+ for (var i = 0; i <= 10; i += 1) {
+ if (parent !== undefined && parent.hasClass(klass)) {
+ returnEl = parent;
+ break;
+ } else if (parent !== undefined) {
+ parent = parent.parent();
}
- }
- return _symbolIterator;
-}
-/**
- * @param {?} obj
- * @return {?}
- */
-function isPrimitive(obj) {
- return !isJsObject(obj);
-}
-/**
- * @param {?} s
- * @return {?}
- */
-function escapeRegExp(s) {
- return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
-}
-//# sourceMappingURL=lang.js.map
-/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(53)))
+ }
-/***/ }),
-/* 8 */
-/***/ (function(module, exports, __webpack_require__) {
+ return returnEl;
+ },
-"use strict";
-/**
- * Random utility functions used in the UI-Router code
- *
- * These functions are exported, but are subject to change without notice.
- *
- * @preferred
- * @module common
- */ /** for typedoc */
-
-var predicates_1 = __webpack_require__(12);
-var hof_1 = __webpack_require__(16);
-var coreservices_1 = __webpack_require__(31);
-var w = typeof window === 'undefined' ? {} : window;
-var angular = w.angular || {};
-exports.fromJson = angular.fromJson || JSON.parse.bind(JSON);
-exports.toJson = angular.toJson || JSON.stringify.bind(JSON);
-exports.copy = angular.copy || _copy;
-exports.forEach = angular.forEach || _forEach;
-exports.extend = angular.extend || _extend;
-exports.equals = angular.equals || _equals;
-exports.identity = function (x) { return x; };
-exports.noop = function () { return undefined; };
-/**
- * Builds proxy functions on the `to` object which pass through to the `from` object.
- *
- * For each key in `fnNames`, creates a proxy function on the `to` object.
- * The proxy function calls the real function on the `from` object.
- *
- *
- * #### Example:
- * This example creates an new class instance whose functions are prebound to the new'd object.
- * ```js
- * class Foo {
- * constructor(data) {
- * // Binds all functions from Foo.prototype to 'this',
- * // then copies them to 'this'
- * bindFunctions(Foo.prototype, this, this);
- * this.data = data;
- * }
- *
- * log() {
- * console.log(this.data);
- * }
- * }
- *
- * let myFoo = new Foo([1,2,3]);
- * var logit = myFoo.log;
- * logit(); // logs [1, 2, 3] from the myFoo 'this' instance
- * ```
- *
- * #### Example:
- * This example creates a bound version of a service function, and copies it to another object
- * ```
- *
- * var SomeService = {
- * this.data = [3, 4, 5];
- * this.log = function() {
- * console.log(this.data);
- * }
- * }
- *
- * // Constructor fn
- * function OtherThing() {
- * // Binds all functions from SomeService to SomeService,
- * // then copies them to 'this'
- * bindFunctions(SomeService, this, SomeService);
- * }
- *
- * let myOtherThing = new OtherThing();
- * myOtherThing.log(); // logs [3, 4, 5] from SomeService's 'this'
- * ```
- *
- * @param source A function that returns the source object which contains the original functions to be bound
- * @param target A function that returns the target object which will receive the bound functions
- * @param bind A function that returns the object which the functions will be bound to
- * @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object)
- * @param latebind If true, the binding of the function is delayed until the first time it's invoked
- */
-function createProxyFunctions(source, target, bind, fnNames, latebind) {
- if (latebind === void 0) { latebind = false; }
- var bindFunction = function (fnName) {
- return source()[fnName].bind(bind());
- };
- var makeLateRebindFn = function (fnName) { return function lateRebindFunction() {
- target[fnName] = bindFunction(fnName);
- return target[fnName].apply(null, arguments);
- }; };
- fnNames = fnNames || Object.keys(source());
- return fnNames.reduce(function (acc, name) {
- acc[name] = latebind ? makeLateRebindFn(name) : bindFunction(name);
- return acc;
- }, target);
-}
-exports.createProxyFunctions = createProxyFunctions;
-/**
- * prototypal inheritance helper.
- * Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it
- */
-exports.inherit = function (parent, extra) {
- return exports.extend(new (exports.extend(function () { }, { prototype: parent }))(), extra);
-};
-/**
- * Given an arguments object, converts the arguments at index idx and above to an array.
- * This is similar to es6 rest parameters.
- *
- * Optionally, the argument at index idx may itself already be an array.
- *
- * For example,
- * given either:
- * arguments = [ obj, "foo", "bar" ]
- * or:
- * arguments = [ obj, ["foo", "bar"] ]
- * then:
- * restArgs(arguments, 1) == ["foo", "bar"]
- *
- * This allows functions like pick() to be implemented such that it allows either a bunch
- * of string arguments (like es6 rest parameters), or a single array of strings:
- *
- * given:
- * var obj = { foo: 1, bar: 2, baz: 3 };
- * then:
- * pick(obj, "foo", "bar"); // returns { foo: 1, bar: 2 }
- * pick(obj, ["foo", "bar"]); // returns { foo: 1, bar: 2 }
- */
-var restArgs = function (args, idx) {
- if (idx === void 0) { idx = 0; }
- return Array.prototype.concat.apply(Array.prototype, Array.prototype.slice.call(args, idx));
-};
-/** Given an array, returns true if the object is found in the array, (using indexOf) */
-exports.inArray = hof_1.curry(_inArray);
-function _inArray(array, obj) {
- return array.indexOf(obj) !== -1;
-}
-exports._inArray = _inArray;
-/**
- * Given an array, and an item, if the item is found in the array, it removes it (in-place).
- * The same array is returned
- */
-exports.removeFrom = hof_1.curry(_removeFrom);
-function _removeFrom(array, obj) {
- var idx = array.indexOf(obj);
- if (idx >= 0)
- array.splice(idx, 1);
- return array;
-}
-exports._removeFrom = _removeFrom;
-/** pushes a values to an array and returns the value */
-exports.pushTo = hof_1.curry(_pushTo);
-function _pushTo(arr, val) {
- return (arr.push(val), val);
-}
-exports._pushTo = _pushTo;
-/** Given an array of (deregistration) functions, calls all functions and removes each one from the source array */
-exports.deregAll = function (functions) {
- return functions.slice().forEach(function (fn) {
- typeof fn === 'function' && fn();
- exports.removeFrom(functions, fn);
- });
-};
-/**
- * Applies a set of defaults to an options object. The options object is filtered
- * to only those properties of the objects in the defaultsList.
- * Earlier objects in the defaultsList take precedence when applying defaults.
- */
-function defaults(opts) {
- if (opts === void 0) { opts = {}; }
- var defaultsList = [];
- for (var _i = 1; _i < arguments.length; _i++) {
- defaultsList[_i - 1] = arguments[_i];
- }
- var defaults = merge.apply(null, [{}].concat(defaultsList));
- return exports.extend({}, defaults, pick(opts || {}, Object.keys(defaults)));
-}
-exports.defaults = defaults;
-/**
- * Merges properties from the list of objects to the destination object.
- * If a property already exists in the destination object, then it is not overwritten.
- */
-function merge(dst) {
- var objs = [];
- for (var _i = 1; _i < arguments.length; _i++) {
- objs[_i - 1] = arguments[_i];
- }
- exports.forEach(objs, function (obj) {
- exports.forEach(obj, function (value, key) {
- if (!dst.hasOwnProperty(key))
- dst[key] = value;
- });
- });
- return dst;
-}
-exports.merge = merge;
-/** Reduce function that merges each element of the list into a single object, using extend */
-exports.mergeR = function (memo, item) { return exports.extend(memo, item); };
-/**
- * Finds the common ancestor path between two states.
- *
- * @param {Object} first The first state.
- * @param {Object} second The second state.
- * @return {Array} Returns an array of state names in descending order, not including the root.
- */
-function ancestors(first, second) {
- var path = [];
- for (var n in first.path) {
- if (first.path[n] !== second.path[n])
+ findWithClassElementDesc = function (el, klass) {
+ var child;
+ for (var i = 0; i < el.children.length; i += 1) {
+ child = el.children[i];
+ if (child !== undefined && angular.element(child).hasClass(klass)) {
+ break;
+ } else if (child.children !== undefined) {
+ child = findWithClassElementDesc(child, klass);
+ if (child.length > 0) {
break;
- path.push(first.path[n]);
- }
- return path;
-}
-exports.ancestors = ancestors;
-function pickOmitImpl(predicate, obj) {
- var keys = [];
- for (var _i = 2; _i < arguments.length; _i++) {
- keys[_i - 2] = arguments[_i];
- }
- var objCopy = {};
- for (var key in obj) {
- if (predicate(keys, key))
- objCopy[key] = obj[key];
- }
- return objCopy;
-}
-/** Return a copy of the object only containing the whitelisted properties. */
-function pick(obj) {
- return pickOmitImpl.apply(null, [exports.inArray].concat(restArgs(arguments)));
-}
-exports.pick = pick;
-/** Return a copy of the object omitting the blacklisted properties. */
-function omit(obj) {
- var notInArray = function (array, item) { return !exports.inArray(array, item); };
- return pickOmitImpl.apply(null, [notInArray].concat(restArgs(arguments)));
-}
-exports.omit = omit;
-/**
- * Maps an array, or object to a property (by name)
- */
-function pluck(collection, propName) {
- return map(collection, hof_1.prop(propName));
-}
-exports.pluck = pluck;
-/** Filters an Array or an Object's properties based on a predicate */
-function filter(collection, callback) {
- var arr = predicates_1.isArray(collection), result = arr ? [] : {};
- var accept = arr ? function (x) { return result.push(x); } : function (x, key) { return result[key] = x; };
- exports.forEach(collection, function (item, i) {
- if (callback(item, i))
- accept(item, i);
- });
- return result;
-}
-exports.filter = filter;
-/** Finds an object from an array, or a property of an object, that matches a predicate */
-function find(collection, callback) {
- var result;
- exports.forEach(collection, function (item, i) {
- if (result)
- return;
- if (callback(item, i))
- result = item;
- });
- return result;
-}
-exports.find = find;
-/** Given an object, returns a new object, where each property is transformed by the callback function */
-exports.mapObj = map;
-/** Maps an array or object properties using a callback function */
-function map(collection, callback) {
- var result = predicates_1.isArray(collection) ? [] : {};
- exports.forEach(collection, function (item, i) { return result[i] = callback(item, i); });
- return result;
-}
-exports.map = map;
-/**
- * Given an object, return its enumerable property values
- *
- * @example
- * ```
- *
- * let foo = { a: 1, b: 2, c: 3 }
- * let vals = values(foo); // [ 1, 2, 3 ]
- * ```
- */
-exports.values = function (obj) {
- return Object.keys(obj).map(function (key) { return obj[key]; });
-};
-/**
- * Reduce function that returns true if all of the values are truthy.
- *
- * @example
- * ```
- *
- * let vals = [ 1, true, {}, "hello world"];
- * vals.reduce(allTrueR, true); // true
- *
- * vals.push(0);
- * vals.reduce(allTrueR, true); // false
- * ```
- */
-exports.allTrueR = function (memo, elem) { return memo && elem; };
-/**
- * Reduce function that returns true if any of the values are truthy.
- *
- * * @example
- * ```
- *
- * let vals = [ 0, null, undefined ];
- * vals.reduce(anyTrueR, true); // false
- *
- * vals.push("hello world");
- * vals.reduce(anyTrueR, true); // true
- * ```
- */
-exports.anyTrueR = function (memo, elem) { return memo || elem; };
-/**
- * Reduce function which un-nests a single level of arrays
- * @example
- * ```
- *
- * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ];
- * input.reduce(unnestR, []) // [ "a", "b", "c", "d", [ "double, "nested" ] ]
- * ```
- */
-exports.unnestR = function (memo, elem) { return memo.concat(elem); };
-/**
- * Reduce function which recursively un-nests all arrays
- *
- * @example
- * ```
- *
- * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ];
- * input.reduce(unnestR, []) // [ "a", "b", "c", "d", "double, "nested" ]
- * ```
- */
-exports.flattenR = function (memo, elem) {
- return predicates_1.isArray(elem) ? memo.concat(elem.reduce(exports.flattenR, [])) : pushR(memo, elem);
-};
-/**
- * Reduce function that pushes an object to an array, then returns the array.
- * Mostly just for [[flattenR]] and [[uniqR]]
- */
-function pushR(arr, obj) {
- arr.push(obj);
- return arr;
-}
-exports.pushR = pushR;
-/** Reduce function that filters out duplicates */
-exports.uniqR = function (acc, token) {
- return exports.inArray(acc, token) ? acc : pushR(acc, token);
-};
-/**
- * Return a new array with a single level of arrays unnested.
- *
- * @example
- * ```
- *
- * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ];
- * unnest(input) // [ "a", "b", "c", "d", [ "double, "nested" ] ]
- * ```
- */
-exports.unnest = function (arr) { return arr.reduce(exports.unnestR, []); };
-/**
- * Return a completely flattened version of an array.
- *
- * @example
- * ```
- *
- * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ];
- * flatten(input) // [ "a", "b", "c", "d", "double, "nested" ]
- * ```
- */
-exports.flatten = function (arr) { return arr.reduce(exports.flattenR, []); };
-/**
- * Given a .filter Predicate, builds a .filter Predicate which throws an error if any elements do not pass.
- * @example
- * ```
- *
- * let isNumber = (obj) => typeof(obj) === 'number';
- * let allNumbers = [ 1, 2, 3, 4, 5 ];
- * allNumbers.filter(assertPredicate(isNumber)); //OK
- *
- * let oneString = [ 1, 2, 3, 4, "5" ];
- * oneString.filter(assertPredicate(isNumber, "Not all numbers")); // throws Error(""Not all numbers"");
- * ```
- */
-exports.assertPredicate = assertFn;
-/**
- * Given a .map function, builds a .map function which throws an error if any mapped elements do not pass a truthyness test.
- * @example
- * ```
- *
- * var data = { foo: 1, bar: 2 };
- *
- * let keys = [ 'foo', 'bar' ]
- * let values = keys.map(assertMap(key => data[key], "Key not found"));
- * // values is [1, 2]
- *
- * let keys = [ 'foo', 'bar', 'baz' ]
- * let values = keys.map(assertMap(key => data[key], "Key not found"));
- * // throws Error("Key not found")
- * ```
- */
-exports.assertMap = assertFn;
-function assertFn(predicateOrMap, errMsg) {
- if (errMsg === void 0) { errMsg = "assert failure"; }
- return function (obj) {
- var result = predicateOrMap(obj);
- if (!result) {
- throw new Error(predicates_1.isFunction(errMsg) ? errMsg(obj) : errMsg);
+ }
}
- return result;
- };
-}
-exports.assertFn = assertFn;
-/**
- * Like _.pairs: Given an object, returns an array of key/value pairs
- *
- * @example
- * ```
- *
- * pairs({ foo: "FOO", bar: "BAR }) // [ [ "foo", "FOO" ], [ "bar": "BAR" ] ]
- * ```
- */
-exports.pairs = function (obj) {
- return Object.keys(obj).map(function (key) { return [key, obj[key]]; });
-};
-/**
- * Given two or more parallel arrays, returns an array of tuples where
- * each tuple is composed of [ a[i], b[i], ... z[i] ]
- *
- * @example
- * ```
- *
- * let foo = [ 0, 2, 4, 6 ];
- * let bar = [ 1, 3, 5, 7 ];
- * let baz = [ 10, 30, 50, 70 ];
- * arrayTuples(foo, bar); // [ [0, 1], [2, 3], [4, 5], [6, 7] ]
- * arrayTuples(foo, bar, baz); // [ [0, 1, 10], [2, 3, 30], [4, 5, 50], [6, 7, 70] ]
- * ```
- */
-function arrayTuples() {
- var arrayArgs = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- arrayArgs[_i] = arguments[_i];
- }
- if (arrayArgs.length === 0)
- return [];
- var length = arrayArgs.reduce(function (min, arr) { return Math.min(arr.length, min); }, 9007199254740991); // aka 2^53 − 1 aka Number.MAX_SAFE_INTEGER
- return Array.apply(null, Array(length)).map(function (ignored, idx) { return arrayArgs.map(function (arr) { return arr[idx]; }); });
-}
-exports.arrayTuples = arrayTuples;
-/**
- * Reduce function which builds an object from an array of [key, value] pairs.
- *
- * Each iteration sets the key/val pair on the memo object, then returns the memo for the next iteration.
- *
- * Each keyValueTuple should be an array with values [ key: string, value: any ]
- *
- * @example
- * ```
- *
- * var pairs = [ ["fookey", "fooval"], ["barkey", "barval"] ]
- *
- * var pairsToObj = pairs.reduce((memo, pair) => applyPairs(memo, pair), {})
- * // pairsToObj == { fookey: "fooval", barkey: "barval" }
- *
- * // Or, more simply:
- * var pairsToObj = pairs.reduce(applyPairs, {})
- * // pairsToObj == { fookey: "fooval", barkey: "barval" }
- * ```
- */
-function applyPairs(memo, keyValTuple) {
- var key, value;
- if (predicates_1.isArray(keyValTuple))
- key = keyValTuple[0], value = keyValTuple[1];
- if (!predicates_1.isString(key))
- throw new Error("invalid parameters to applyPairs");
- memo[key] = value;
- return memo;
-}
-exports.applyPairs = applyPairs;
-/** Get the last element of an array */
-function tail(arr) {
- return arr.length && arr[arr.length - 1] || undefined;
-}
-exports.tail = tail;
-/**
- * shallow copy from src to dest
- *
- * note: This is a shallow copy, while angular.copy is a deep copy.
- * ui-router uses `copy` only to make copies of state parameters.
- */
-function _copy(src, dest) {
- if (dest)
- Object.keys(dest).forEach(function (key) { return delete dest[key]; });
- if (!dest)
- dest = {};
- return exports.extend(dest, src);
-}
-/** Naive forEach implementation works with Objects or Arrays */
-function _forEach(obj, cb, _this) {
- if (predicates_1.isArray(obj))
- return obj.forEach(cb, _this);
- Object.keys(obj).forEach(function (key) { return cb(obj[key], key); });
-}
-function _copyProps(to, from) {
- Object.keys(from).forEach(function (key) { return to[key] = from[key]; });
- return to;
-}
-function _extend(toObj) {
- return restArgs(arguments, 1).filter(exports.identity).reduce(_copyProps, toObj);
-}
-function _equals(o1, o2) {
- if (o1 === o2)
- return true;
- if (o1 === null || o2 === null)
- return false;
- if (o1 !== o1 && o2 !== o2)
- return true; // NaN === NaN
- var t1 = typeof o1, t2 = typeof o2;
- if (t1 !== t2 || t1 !== 'object')
- return false;
- var tup = [o1, o2];
- if (hof_1.all(predicates_1.isArray)(tup))
- return _arraysEq(o1, o2);
- if (hof_1.all(predicates_1.isDate)(tup))
- return o1.getTime() === o2.getTime();
- if (hof_1.all(predicates_1.isRegExp)(tup))
- return o1.toString() === o2.toString();
- if (hof_1.all(predicates_1.isFunction)(tup))
- return true; // meh
- var predicates = [predicates_1.isFunction, predicates_1.isArray, predicates_1.isDate, predicates_1.isRegExp];
- if (predicates.map(hof_1.any).reduce(function (b, fn) { return b || !!fn(tup); }, false))
- return false;
- var key, keys = {};
- for (key in o1) {
- if (!_equals(o1[key], o2[key]))
- return false;
- keys[key] = true;
- }
- for (key in o2) {
- if (!keys[key])
- return false;
- }
- return true;
-}
-function _arraysEq(a1, a2) {
- if (a1.length !== a2.length)
- return false;
- return arrayTuples(a1, a2).reduce(function (b, t) { return b && _equals(t[0], t[1]); }, true);
-}
-/**
- * Create a sort function
- *
- * Creates a sort function which sorts by a numeric property.
- *
- * The `propFn` should return the property as a number which can be sorted.
- *
- * #### Example:
- * This example returns the `priority` prop.
- * ```js
- * var sortfn = sortBy(obj => obj.priority)
- * // equivalent to:
- * var longhandSortFn = (a, b) => a.priority - b.priority;
- * ```
- *
- * #### Example:
- * This example uses [[prop]]
- * ```js
- * var sortfn = sortBy(prop('priority'))
- * ```
- *
- * The `checkFn` can be used to exclude objects from sorting.
- *
- * #### Example:
- * This example only sorts objects with type === 'FOO'
- * ```js
- * var sortfn = sortBy(prop('priority'), propEq('type', 'FOO'))
- * ```
- *
- * @param propFn a function that returns the property (as a number)
- * @param checkFn a predicate
- *
- * @return a sort function like: `(a, b) => (checkFn(a) && checkFn(b)) ? propFn(a) - propFn(b) : 0`
- */
-exports.sortBy = function (propFn, checkFn) {
- if (checkFn === void 0) { checkFn = hof_1.val(true); }
- return function (a, b) {
- return (checkFn(a) && checkFn(b)) ? propFn(a) - propFn(b) : 0;
- };
-};
-/**
- * Composes a list of sort functions
- *
- * Creates a sort function composed of multiple sort functions.
- * Each sort function is invoked in series.
- * The first sort function to return non-zero "wins".
- *
- * @param sortFns list of sort functions
- */
-exports.composeSort = function () {
- var sortFns = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- sortFns[_i] = arguments[_i];
- }
- return function (a, b) {
- return sortFns.reduce(function (prev, fn) { return prev || fn(a, b); }, 0);
- };
-};
-// issue #2676
-exports.silenceUncaughtInPromise = function (promise) {
- return promise.catch(function (e) { return 0; }) && promise;
-};
-exports.silentRejection = function (error) {
- return exports.silenceUncaughtInPromise(coreservices_1.services.$q.reject(error));
-};
-//# sourceMappingURL=common.js.map
+ }
-/***/ }),
-/* 9 */
-/***/ (function(module, exports, __webpack_require__) {
+ return angular.element(child);
+ },
-var isObject = __webpack_require__(14);
-module.exports = function(it){
- if(!isObject(it))throw TypeError(it + ' is not an object!');
- return it;
-};
+ findFormGroupElement = function (el) {
+ return findWithClassElementAsc(el, 'form-group');
+ },
-/***/ }),
-/* 10 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ findInputGroupElement = function (el) {
+ return findWithClassElementDesc(el, 'input-group');
+ },
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__facade_lang__ = __webpack_require__(6);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return TypeModifier; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return Type; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return BuiltinTypeName; });
-/* unused harmony export BuiltinType */
-/* unused harmony export ExpressionType */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return ArrayType; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return MapType; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return DYNAMIC_TYPE; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return BOOL_TYPE; });
-/* unused harmony export INT_TYPE */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return NUMBER_TYPE; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return STRING_TYPE; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return FUNCTION_TYPE; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return NULL_TYPE; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return BinaryOperator; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return Expression; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return BuiltinVar; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return ReadVarExpr; });
-/* unused harmony export WriteVarExpr */
-/* unused harmony export WriteKeyExpr */
-/* unused harmony export WritePropExpr */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return BuiltinMethod; });
-/* unused harmony export InvokeMethodExpr */
-/* unused harmony export InvokeFunctionExpr */
-/* unused harmony export InstantiateExpr */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return LiteralExpr; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return ExternalExpr; });
-/* unused harmony export ConditionalExpr */
-/* unused harmony export NotExpr */
-/* unused harmony export CastExpr */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return FnParam; });
-/* unused harmony export FunctionExpr */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return BinaryOperatorExpr; });
-/* unused harmony export ReadPropExpr */
-/* unused harmony export ReadKeyExpr */
-/* unused harmony export LiteralArrayExpr */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return LiteralMapEntry; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return LiteralMapExpr; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return THIS_EXPR; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return SUPER_EXPR; });
-/* unused harmony export CATCH_ERROR_VAR */
-/* unused harmony export CATCH_STACK_VAR */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return NULL_EXPR; });
-/* unused harmony export TYPED_NULL_EXPR */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return StmtModifier; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return Statement; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return DeclareVarStmt; });
-/* unused harmony export DeclareFunctionStmt */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return ExpressionStatement; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return ReturnStatement; });
-/* unused harmony export AbstractClassPart */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ClassField; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return ClassMethod; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return ClassGetter; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return ClassStmt; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return IfStmt; });
-/* unused harmony export CommentStmt */
-/* unused harmony export TryCatchStmt */
-/* unused harmony export ThrowStmt */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return ExpressionTransformer; });
-/* unused harmony export RecursiveExpressionVisitor */
-/* harmony export (immutable) */ __webpack_exports__["I"] = replaceVarInExpression;
-/* harmony export (immutable) */ __webpack_exports__["w"] = findReadVarNames;
-/* harmony export (immutable) */ __webpack_exports__["a"] = variable;
-/* harmony export (immutable) */ __webpack_exports__["g"] = importExpr;
-/* harmony export (immutable) */ __webpack_exports__["d"] = importType;
-/* harmony export (immutable) */ __webpack_exports__["P"] = expressionType;
-/* harmony export (immutable) */ __webpack_exports__["h"] = literalArr;
-/* harmony export (immutable) */ __webpack_exports__["l"] = literalMap;
-/* harmony export (immutable) */ __webpack_exports__["v"] = not;
-/* harmony export (immutable) */ __webpack_exports__["B"] = fn;
-/* harmony export (immutable) */ __webpack_exports__["f"] = literal;
-/**
- * @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 = (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 __());
-};
+ insertAfter = function (referenceNode, newNode) {
+ referenceNode[0].parentNode.insertBefore(newNode[0], referenceNode[0].nextSibling);
+ },
-var TypeModifier = {};
-TypeModifier.Const = 0;
-TypeModifier[TypeModifier.Const] = "Const";
-/**
- * @abstract
- */
-var Type = (function () {
- /**
- * @param {?=} modifiers
- */
- function Type(modifiers) {
- if (modifiers === void 0) { modifiers = null; }
- this.modifiers = modifiers;
- if (!modifiers) {
- this.modifiers = [];
- }
- }
- /**
- * @abstract
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- Type.prototype.visitType = function (visitor, context) { };
- /**
- * @param {?} modifier
- * @return {?}
- */
- Type.prototype.hasModifier = function (modifier) { return this.modifiers.indexOf(modifier) !== -1; };
- return Type;
-}());
-function Type_tsickle_Closure_declarations() {
- /** @type {?} */
- Type.prototype.modifiers;
-}
-var BuiltinTypeName = {};
-BuiltinTypeName.Dynamic = 0;
-BuiltinTypeName.Bool = 1;
-BuiltinTypeName.String = 2;
-BuiltinTypeName.Int = 3;
-BuiltinTypeName.Number = 4;
-BuiltinTypeName.Function = 5;
-BuiltinTypeName.Null = 6;
-BuiltinTypeName[BuiltinTypeName.Dynamic] = "Dynamic";
-BuiltinTypeName[BuiltinTypeName.Bool] = "Bool";
-BuiltinTypeName[BuiltinTypeName.String] = "String";
-BuiltinTypeName[BuiltinTypeName.Int] = "Int";
-BuiltinTypeName[BuiltinTypeName.Number] = "Number";
-BuiltinTypeName[BuiltinTypeName.Function] = "Function";
-BuiltinTypeName[BuiltinTypeName.Null] = "Null";
-var BuiltinType = (function (_super) {
- __extends(BuiltinType, _super);
- /**
- * @param {?} name
- * @param {?=} modifiers
- */
- function BuiltinType(name, modifiers) {
- if (modifiers === void 0) { modifiers = null; }
- _super.call(this, modifiers);
- this.name = name;
- }
/**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
+ * @ngdoc property
+ * @name bootstrap3ElementModifier#addValidationStateIcons
+ * @propertyOf bootstrap3ElementModifier
+ * @returns {bool} True if an state icon will be added to the element in the valid and invalid control
+ * states. The default is false.
*/
- BuiltinType.prototype.visitType = function (visitor, context) {
- return visitor.visitBuiltintType(this, context);
- };
- return BuiltinType;
-}(Type));
-function BuiltinType_tsickle_Closure_declarations() {
- /** @type {?} */
- BuiltinType.prototype.name;
-}
-var ExpressionType = (function (_super) {
- __extends(ExpressionType, _super);
+ addValidationStateIcons = false,
+
/**
- * @param {?} value
- * @param {?=} typeParams
- * @param {?=} modifiers
+ * @ngdoc function
+ * @name bootstrap3ElementModifier#enableValidationStateIcons
+ * @methodOf bootstrap3ElementModifier
+ *
+ * @description
+ * Makes an element appear invalid by apply an icon to the input element.
+ *
+ * @param {bool} enable - True to enable the icon otherwise false.
*/
- function ExpressionType(value, typeParams, modifiers) {
- if (typeParams === void 0) { typeParams = null; }
- if (modifiers === void 0) { modifiers = null; }
- _super.call(this, modifiers);
- this.value = value;
- this.typeParams = typeParams;
- }
+ enableValidationStateIcons = function (enable) {
+ addValidationStateIcons = enable;
+ },
+
/**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
+ * @ngdoc function
+ * @name bootstrap3ElementModifier#makeValid
+ * @methodOf bootstrap3ElementModifier
+ *
+ * @description
+ * Makes an element appear valid by apply bootstrap 3 specific styles and child elements. If the service
+ * property 'addValidationStateIcons' is true it will also append validation glyphicon to the element.
+ * See: http://getbootstrap.com/css/#forms-control-validation
+ *
+ * @param {Element} el - The input control element that is the target of the validation.
*/
- ExpressionType.prototype.visitType = function (visitor, context) {
- return visitor.visitExpressionType(this, context);
- };
- return ExpressionType;
-}(Type));
-function ExpressionType_tsickle_Closure_declarations() {
- /** @type {?} */
- ExpressionType.prototype.value;
- /** @type {?} */
- ExpressionType.prototype.typeParams;
-}
-var ArrayType = (function (_super) {
- __extends(ArrayType, _super);
+ makeValid = function (el) {
+ var frmGroupEl = findFormGroupElement(el),
+ inputGroupEl;
+
+ if (frmGroupEl) {
+ reset(frmGroupEl);
+ inputGroupEl = findInputGroupElement(frmGroupEl[0]);
+ frmGroupEl.addClass('has-success ' + (inputGroupEl.length > 0 || addValidationStateIcons === false ? '' : 'has-feedback'));
+ if (addValidationStateIcons) {
+ var iconElText = '';
+ if (inputGroupEl.length > 0) {
+ iconElText = iconElText.replace('form-', '');
+ iconElText = '' + iconElText + '' + errorMsg + ''),
+ inputGroupEl;
+
+ if (frmGroupEl) {
+ reset(frmGroupEl);
+ inputGroupEl = findInputGroupElement(frmGroupEl[0]);
+ frmGroupEl.addClass('has-error ' + (inputGroupEl.length > 0 || addValidationStateIcons === false ? '' : 'has-feedback'));
+ insertAfter(inputGroupEl.length > 0 ? inputGroupEl : getCorrectElementToPlaceErrorElementAfter(el), helpTextEl);
+ if (addValidationStateIcons) {
+ var iconElText = '';
+ if (inputGroupEl.length > 0) {
+ iconElText = iconElText.replace('form-', '');
+ iconElText = '' + iconElText + ' 0 ? parentColumn : el, el);
+ },
+
/**
- * @param {?} condition
- * @param {?} trueCase
- * @param {?=} falseCase
- * @param {?=} type
+ * @ngdoc function
+ * @name foundation5ElementModifier#makeInvalid
+ * @methodOf foundation5ElementModifier
+ *
+ * @description
+ * Makes an element appear invalid by apply Foundation 5 specific styles and child elements.
+ * See: http://foundation.zurb.com/docs/components/forms.html
+ *
+ * @param {Element} el - The input control element that is the target of the validation.
*/
- function ConditionalExpr(condition, trueCase, falseCase, type) {
- if (falseCase === void 0) { falseCase = null; }
- if (type === void 0) { type = null; }
- _super.call(this, type || trueCase.type);
- this.condition = condition;
- this.falseCase = falseCase;
- this.trueCase = trueCase;
- }
+ makeInvalid = function (el, errorMsg) {
+ var parentColumn = findParentColumn(el),
+ helpTextEl;
+ reset(parentColumn || el, el);
+ el.addClass('error');
+ if (parentColumn) {
+ helpTextEl = angular.element('' + errorMsg + '');
+ parentColumn.append(helpTextEl);
+ }
+ },
+
/**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
+ * @ngdoc function
+ * @name foundation5ElementModifier#makeDefault
+ * @methodOf foundation5ElementModifier
+ *
+ * @description
+ * Makes an element appear in its default visual state by apply foundation 5 specific styles and child elements.
+ *
+ * @param {Element} el - The input control element that is the target of the validation.
*/
- ConditionalExpr.prototype.visitExpression = function (visitor, context) {
- return visitor.visitConditionalExpr(this, context);
+ makeDefault = function (el) {
+ makeValid(el);
};
- return ConditionalExpr;
-}(Expression));
-function ConditionalExpr_tsickle_Closure_declarations() {
- /** @type {?} */
- ConditionalExpr.prototype.trueCase;
- /** @type {?} */
- ConditionalExpr.prototype.condition;
- /** @type {?} */
- ConditionalExpr.prototype.falseCase;
+
+ return {
+ makeValid: makeValid,
+ makeInvalid: makeInvalid,
+ makeDefault: makeDefault,
+ key: 'foundation5'
+ };
}
-var NotExpr = (function (_super) {
- __extends(NotExpr, _super);
- /**
- * @param {?} condition
- */
- function NotExpr(condition) {
- _super.call(this, BOOL_TYPE);
- this.condition = condition;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- NotExpr.prototype.visitExpression = function (visitor, context) {
- return visitor.visitNotExpr(this, context);
- };
- return NotExpr;
-}(Expression));
-function NotExpr_tsickle_Closure_declarations() {
- /** @type {?} */
- NotExpr.prototype.condition;
+
+angular.module('jcs-autoValidate').factory('foundation5ElementModifier', Foundation5ElementModifierFn);
+
+function ElementUtilsFn() {
+ var isElementVisible = function (el) {
+ return el[0].offsetWidth > 0 && el[0].offsetHeight > 0;
+ };
+
+ return {
+ isElementVisible: isElementVisible
+ };
}
-var CastExpr = (function (_super) {
- __extends(CastExpr, _super);
+
+function ValidationManagerFn(validator, elementUtils) {
+ var elementTypesToValidate = ['input', 'textarea', 'select', 'form'],
+
+ elementIsVisible = function (el) {
+ return elementUtils.isElementVisible(el);
+ },
+
+ getFormOptions = function (el) {
+ var frmCtrl = angular.element(el).controller('form'),
+ options;
+
+ if (frmCtrl !== undefined && frmCtrl !== null) {
+ options = frmCtrl.autoValidateFormOptions;
+ } else {
+ options = validator.defaultFormValidationOptions;
+ }
+
+ return options;
+ },
+
/**
- * @param {?} value
- * @param {?} type
+ * Only validate if the element is present, it is visible, if it is not a comment,
+ * it is either a valid user input control (input, select, textare, form) or
+ * it is a custom control register by the developer.
+ * @param el
+ * @param formOptions The validation options of the parent form
+ * @returns {boolean} true to indicate it should be validated
*/
- function CastExpr(value, type) {
- _super.call(this, type);
- this.value = value;
- }
+ shouldValidateElement = function (el, formOptions, formSubmitted) {
+ var elementExists = el && el.length > 0,
+ isElementAComment = elementExists && el[0].nodeName.toLowerCase() === '#comment',
+ correctVisibilityToValidate,
+ correctTypeToValidate,
+ correctPhaseToValidate;
+
+ if (elementExists && isElementAComment === false) {
+ correctVisibilityToValidate = elementIsVisible(el) || formOptions.validateNonVisibleControls;
+ correctTypeToValidate = elementTypesToValidate.indexOf(el[0].nodeName.toLowerCase()) > -1 ||
+ el[0].hasAttribute('register-custom-form-control');
+ correctPhaseToValidate = formOptions.validateOnFormSubmit === false ||
+ (formOptions.validateOnFormSubmit === true && formSubmitted === true);
+ }
+
+ return elementExists && !isElementAComment && correctVisibilityToValidate && correctTypeToValidate && correctPhaseToValidate;
+
+ },
+
/**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
+ * @ngdoc validateElement
+ * @name validation#validateElement
+ * @param {object} modelCtrl holds the information about the element e.g. $invalid, $valid
+ * @param {options}
+ * - forceValidation if set to true forces the validation even if the element is pristine
+ * - disabled if set to true forces the validation is disabled and will return true
+ * - validateNonVisibleControls if set to true forces the validation of non visible element i.e. display:block
+ * @description
+ * Validate the form element and make invalid/valid element model status.
+ *
+ * As of v1.17.22:
+ * BREAKING CHANGE to validateElement on the validationManger. The third parameter is now the parent form's
+ * autoValidateFormOptions object on the form controller. This can be left blank and will be found by the
+ * validationManager.
*/
- CastExpr.prototype.visitExpression = function (visitor, context) {
- return visitor.visitCastExpr(this, context);
- };
- return CastExpr;
-}(Expression));
-function CastExpr_tsickle_Closure_declarations() {
- /** @type {?} */
- CastExpr.prototype.value;
-}
-var FnParam = (function () {
- /**
- * @param {?} name
- * @param {?=} type
- */
- function FnParam(name, type) {
- if (type === void 0) { type = null; }
- this.name = name;
- this.type = type;
- }
- return FnParam;
-}());
-function FnParam_tsickle_Closure_declarations() {
- /** @type {?} */
- FnParam.prototype.name;
- /** @type {?} */
- FnParam.prototype.type;
-}
-var FunctionExpr = (function (_super) {
- __extends(FunctionExpr, _super);
- /**
- * @param {?} params
- * @param {?} statements
- * @param {?=} type
- */
- function FunctionExpr(params, statements, type) {
- if (type === void 0) { type = null; }
- _super.call(this, type);
- this.params = params;
- this.statements = statements;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- FunctionExpr.prototype.visitExpression = function (visitor, context) {
- return visitor.visitFunctionExpr(this, context);
- };
- /**
- * @param {?} name
- * @param {?=} modifiers
- * @return {?}
- */
- FunctionExpr.prototype.toDeclStmt = function (name, modifiers) {
- if (modifiers === void 0) { modifiers = null; }
- return new DeclareFunctionStmt(name, this.params, this.statements, this.type, modifiers);
+ validateElement = function (modelCtrl, el, options) {
+ var isValid = true,
+ frmOptions = options || getFormOptions(el),
+ needsValidation = modelCtrl.$pristine === false || frmOptions.forceValidation,
+ errorType,
+ findErrorType = function ($errors) {
+ var keepGoing = true,
+ errorTypeToReturn;
+ angular.forEach($errors, function (status, errortype) {
+ if (keepGoing && status) {
+ keepGoing = false;
+ errorTypeToReturn = errortype;
+ }
+ });
+
+ return errorTypeToReturn;
+ };
+
+ if (frmOptions.disabled === false) {
+ if ((frmOptions.forceValidation ||
+ (shouldValidateElement(el, frmOptions, frmOptions.getFormController().$submitted) &&
+ modelCtrl &&
+ needsValidation))) {
+ isValid = !modelCtrl.$invalid;
+
+ if (frmOptions.removeExternalValidationErrorsOnSubmit && modelCtrl.removeAllExternalValidation) {
+ modelCtrl.removeAllExternalValidation();
+ }
+
+ if (isValid) {
+ validator.makeValid(el);
+ } else {
+ errorType = findErrorType(modelCtrl.$errors || modelCtrl.$error);
+ if (errorType === undefined) {
+ // we have a weird situation some users are encountering where a custom control
+ // is valid but the ngModel is report it isn't and thus no valid error type can be found
+ isValid = true;
+ } else {
+ validator.getErrorMessage(errorType, el).then(function (errorMsg) {
+ validator.makeInvalid(el, errorMsg);
+ });
+ }
+ }
+ }
+ }
+
+ return isValid;
+ },
+
+ resetElement = function (element) {
+ validator.makeDefault(element);
+ },
+
+ resetForm = function (frmElement) {
+ angular.forEach((frmElement[0].all || frmElement[0].elements) || frmElement[0], function (element) {
+ var controller,
+ ctrlElement = angular.element(element);
+ controller = ctrlElement.controller('ngModel');
+
+ if (controller !== undefined) {
+ if (ctrlElement[0].nodeName.toLowerCase() === 'form') {
+ // we probably have a sub form
+ resetForm(ctrlElement);
+ } else {
+ controller.$setPristine();
+ }
+ }
+ });
+ },
+
+ validateForm = function (frmElement) {
+ var frmValid = true,
+ frmCtrl = frmElement ? angular.element(frmElement).controller('form') : undefined,
+ processElement = function (ctrlElement, force, formOptions) {
+ var controller, isValid, ctrlFormOptions, originalForceValue;
+
+ ctrlElement = angular.element(ctrlElement);
+ controller = ctrlElement.controller('ngModel');
+
+ if (controller !== undefined && (force || shouldValidateElement(ctrlElement, formOptions, frmCtrl.$submitted))) {
+ if (ctrlElement[0].nodeName.toLowerCase() === 'form') {
+ // we probably have a sub form
+ validateForm(ctrlElement);
+ } else {
+ // we need to get the options for the element rather than use the passed in as the
+ // element could be an ng-form and have different options to the parent form.
+ ctrlFormOptions = getFormOptions(ctrlElement);
+ originalForceValue = ctrlFormOptions.forceValidation;
+ ctrlFormOptions.forceValidation = force;
+ try {
+ isValid = validateElement(controller, ctrlElement, ctrlFormOptions);
+ frmValid = frmValid && isValid;
+ } finally {
+ ctrlFormOptions.forceValidation = originalForceValue;
+ }
+ }
+ }
+ },
+ clonedOptions;
+
+ if (frmElement === undefined || (frmCtrl !== undefined && frmCtrl.autoValidateFormOptions.disabled)) {
+ return frmElement !== undefined;
+ }
+
+ //force the validation of controls
+ clonedOptions = angular.copy(frmCtrl.autoValidateFormOptions);
+ clonedOptions.forceValidation = true;
+
+ // IE8 holds the child controls collection in the all property
+ // Firefox in the elements and chrome as a child iterator
+ angular.forEach((frmElement[0].elements || frmElement[0].all) || frmElement[0], function (ctrlElement) {
+ processElement(ctrlElement, true, clonedOptions);
+ });
+
+ // If you have a custom form control that should be validated i.e.
+ // ... it will not be part of the forms
+ // HTMLFormControlsCollection and thus won't be included in the above element iteration although
+ // it will be on the Angular FormController (if it has a name attribute). So adding the directive
+ // register-custom-form-control="" to the control root and autoValidate will include it in this
+ // iteration.
+ if (frmElement[0].customHTMLFormControlsCollection) {
+ angular.forEach(frmElement[0].customHTMLFormControlsCollection, function (ctrlElement) {
+ // need to force the validation as the element might not be a known form input type
+ // so the normal validation process will ignore it.
+ processElement(ctrlElement, true, clonedOptions);
+ });
+ }
+
+ return frmValid;
+ },
+
+ setElementValidationError = function (element, errorMsgKey, errorMsg) {
+ if (errorMsgKey) {
+ validator.getErrorMessage(errorMsgKey, element).then(function (msg) {
+ validator.makeInvalid(element, msg);
+ });
+ } else {
+ validator.makeInvalid(element, errorMsg);
+ }
};
- return FunctionExpr;
-}(Expression));
-function FunctionExpr_tsickle_Closure_declarations() {
- /** @type {?} */
- FunctionExpr.prototype.params;
- /** @type {?} */
- FunctionExpr.prototype.statements;
+
+ return {
+ setElementValidationError: setElementValidationError,
+ validateElement: validateElement,
+ validateForm: validateForm,
+ resetElement: resetElement,
+ resetForm: resetForm
+ };
}
-var BinaryOperatorExpr = (function (_super) {
- __extends(BinaryOperatorExpr, _super);
- /**
- * @param {?} operator
- * @param {?} lhs
- * @param {?} rhs
- * @param {?=} type
- */
- function BinaryOperatorExpr(operator, lhs, rhs, type) {
- if (type === void 0) { type = null; }
- _super.call(this, type || lhs.type);
- this.operator = operator;
- this.rhs = rhs;
- this.lhs = lhs;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- BinaryOperatorExpr.prototype.visitExpression = function (visitor, context) {
- return visitor.visitBinaryOperatorExpr(this, context);
- };
- return BinaryOperatorExpr;
-}(Expression));
-function BinaryOperatorExpr_tsickle_Closure_declarations() {
- /** @type {?} */
- BinaryOperatorExpr.prototype.lhs;
- /** @type {?} */
- BinaryOperatorExpr.prototype.operator;
- /** @type {?} */
- BinaryOperatorExpr.prototype.rhs;
+
+ValidationManagerFn.$inject = [
+ 'validator',
+ 'jcs-elementUtils'
+];
+
+angular.module('jcs-autoValidate').factory('jcs-elementUtils', ElementUtilsFn);
+angular.module('jcs-autoValidate').factory('validationManager', ValidationManagerFn);
+
+function parseBooleanAttributeValue(val, defaultValue) {
+ if ((val === undefined || val === null) && defaultValue !== undefined) {
+ return defaultValue;
+ } else {
+ return val !== 'false';
+ }
}
-var ReadPropExpr = (function (_super) {
- __extends(ReadPropExpr, _super);
- /**
- * @param {?} receiver
- * @param {?} name
- * @param {?=} type
- */
- function ReadPropExpr(receiver, name, type) {
- if (type === void 0) { type = null; }
- _super.call(this, type);
- this.receiver = receiver;
- this.name = name;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- ReadPropExpr.prototype.visitExpression = function (visitor, context) {
- return visitor.visitReadPropExpr(this, context);
- };
- /**
- * @param {?} value
- * @return {?}
- */
- ReadPropExpr.prototype.set = function (value) {
- return new WritePropExpr(this.receiver, this.name, value);
- };
- return ReadPropExpr;
-}(Expression));
-function ReadPropExpr_tsickle_Closure_declarations() {
- /** @type {?} */
- ReadPropExpr.prototype.receiver;
- /** @type {?} */
- ReadPropExpr.prototype.name;
+
+function parseOptions(ctrl, validator, attrs) {
+ var opts = ctrl.autoValidateFormOptions = ctrl.autoValidateFormOptions || angular.copy(validator.defaultFormValidationOptions);
+
+ // needed to stop circular ref in json serialisation
+ opts.getFormController = function () {
+ return ctrl;
+ };
+ opts.forceValidation = false;
+ opts.disabled = !validator.isEnabled() || parseBooleanAttributeValue(attrs.disableDynamicValidation, opts.disabled);
+ opts.validateNonVisibleControls = parseBooleanAttributeValue(attrs.validateNonVisibleControls, opts.validateNonVisibleControls);
+ opts.validateOnFormSubmit = parseBooleanAttributeValue(attrs.validateOnFormSubmit, opts.validateOnFormSubmit);
+ opts.removeExternalValidationErrorsOnSubmit = attrs.removeExternalValidationErrorsOnSubmit === undefined ?
+ opts.removeExternalValidationErrorsOnSubmit :
+ parseBooleanAttributeValue(attrs.removeExternalValidationErrorsOnSubmit, opts.removeExternalValidationErrorsOnSubmit);
+
+ // the library might be globally disabled but enabled on a particular form so check the
+ // disableDynamicValidation attribute is on the form
+ if (validator.isEnabled() === false && attrs.disableDynamicValidation === 'false') {
+ opts.disabled = false;
+ }
}
-var ReadKeyExpr = (function (_super) {
- __extends(ReadKeyExpr, _super);
- /**
- * @param {?} receiver
- * @param {?} index
- * @param {?=} type
- */
- function ReadKeyExpr(receiver, index, type) {
- if (type === void 0) { type = null; }
- _super.call(this, type);
- this.receiver = receiver;
- this.index = index;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- ReadKeyExpr.prototype.visitExpression = function (visitor, context) {
- return visitor.visitReadKeyExpr(this, context);
- };
- /**
- * @param {?} value
- * @return {?}
- */
- ReadKeyExpr.prototype.set = function (value) {
- return new WriteKeyExpr(this.receiver, this.index, value);
+
+angular.module('jcs-autoValidate').directive('form', [
+ 'validator',
+ function (validator) {
+ return {
+ restrict: 'E',
+ require: 'form',
+ priority: 9999,
+ compile: function () {
+ return {
+ pre: function (scope, element, attrs, ctrl) {
+ parseOptions(ctrl, validator, attrs);
+ }
+ };
+ }
};
- return ReadKeyExpr;
-}(Expression));
-function ReadKeyExpr_tsickle_Closure_declarations() {
- /** @type {?} */
- ReadKeyExpr.prototype.receiver;
- /** @type {?} */
- ReadKeyExpr.prototype.index;
-}
-var LiteralArrayExpr = (function (_super) {
- __extends(LiteralArrayExpr, _super);
- /**
- * @param {?} entries
- * @param {?=} type
- */
- function LiteralArrayExpr(entries, type) {
- if (type === void 0) { type = null; }
- _super.call(this, type);
- this.entries = entries;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- LiteralArrayExpr.prototype.visitExpression = function (visitor, context) {
- return visitor.visitLiteralArrayExpr(this, context);
+ }
+]);
+
+angular.module('jcs-autoValidate').directive('ngForm', [
+ 'validator',
+ function (validator) {
+ return {
+ restrict: 'EA',
+ require: 'form',
+ priority: 9999,
+ compile: function () {
+ return {
+ pre: function (scope, element, attrs, ctrl) {
+ parseOptions(ctrl, validator, attrs);
+ }
+ };
+ }
};
- return LiteralArrayExpr;
-}(Expression));
-function LiteralArrayExpr_tsickle_Closure_declarations() {
- /** @type {?} */
- LiteralArrayExpr.prototype.entries;
-}
-var LiteralMapEntry = (function () {
- /**
- * @param {?} key
- * @param {?} value
- * @param {?=} quoted
- */
- function LiteralMapEntry(key, value, quoted) {
- if (quoted === void 0) { quoted = false; }
- this.key = key;
- this.value = value;
- this.quoted = quoted;
- }
- return LiteralMapEntry;
-}());
-function LiteralMapEntry_tsickle_Closure_declarations() {
- /** @type {?} */
- LiteralMapEntry.prototype.key;
- /** @type {?} */
- LiteralMapEntry.prototype.value;
- /** @type {?} */
- LiteralMapEntry.prototype.quoted;
-}
-var LiteralMapExpr = (function (_super) {
- __extends(LiteralMapExpr, _super);
- /**
- * @param {?} entries
- * @param {?=} type
- */
- function LiteralMapExpr(entries, type) {
- if (type === void 0) { type = null; }
- _super.call(this, type);
- this.entries = entries;
- this.valueType = null;
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__facade_lang__["c" /* isPresent */])(type)) {
- this.valueType = type.valueType;
+ }
+]);
+
+function FormResetDirectiveFn(validationManager) {
+ return {
+ restrict: 'E',
+ link: function (scope, el) {
+ var formController = el.controller('form');
+
+ function resetFn() {
+ validationManager.resetForm(el);
+ if (formController.$setPristine) {
+ formController.$setPristine();
}
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- LiteralMapExpr.prototype.visitExpression = function (visitor, context) {
- return visitor.visitLiteralMapExpr(this, context);
- };
- return LiteralMapExpr;
-}(Expression));
-function LiteralMapExpr_tsickle_Closure_declarations() {
- /** @type {?} */
- LiteralMapExpr.prototype.valueType;
- /** @type {?} */
- LiteralMapExpr.prototype.entries;
-}
-var /** @type {?} */ THIS_EXPR = new ReadVarExpr(BuiltinVar.This);
-var /** @type {?} */ SUPER_EXPR = new ReadVarExpr(BuiltinVar.Super);
-var /** @type {?} */ CATCH_ERROR_VAR = new ReadVarExpr(BuiltinVar.CatchError);
-var /** @type {?} */ CATCH_STACK_VAR = new ReadVarExpr(BuiltinVar.CatchStack);
-var /** @type {?} */ NULL_EXPR = new LiteralExpr(null, null);
-var /** @type {?} */ TYPED_NULL_EXPR = new LiteralExpr(null, NULL_TYPE);
-var StmtModifier = {};
-StmtModifier.Final = 0;
-StmtModifier.Private = 1;
-StmtModifier[StmtModifier.Final] = "Final";
-StmtModifier[StmtModifier.Private] = "Private";
-/**
- * @abstract
- */
-var Statement = (function () {
- /**
- * @param {?=} modifiers
- */
- function Statement(modifiers) {
- if (modifiers === void 0) { modifiers = null; }
- this.modifiers = modifiers;
- if (!modifiers) {
- this.modifiers = [];
+
+ if (formController.$setUntouched) {
+ formController.$setUntouched();
}
+ }
+
+ if (formController !== undefined &&
+ formController.autoValidateFormOptions &&
+ formController.autoValidateFormOptions.disabled === false) {
+ el.on('reset', resetFn);
+
+ scope.$on('$destroy', function () {
+ el.off('reset', resetFn);
+ });
+ }
}
- /**
- * @abstract
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- Statement.prototype.visitStatement = function (visitor, context) { };
- /**
- * @param {?} modifier
- * @return {?}
- */
- Statement.prototype.hasModifier = function (modifier) { return this.modifiers.indexOf(modifier) !== -1; };
- return Statement;
-}());
-function Statement_tsickle_Closure_declarations() {
- /** @type {?} */
- Statement.prototype.modifiers;
-}
-var DeclareVarStmt = (function (_super) {
- __extends(DeclareVarStmt, _super);
- /**
- * @param {?} name
- * @param {?} value
- * @param {?=} type
- * @param {?=} modifiers
- */
- function DeclareVarStmt(name, value, type, modifiers) {
- if (type === void 0) { type = null; }
- if (modifiers === void 0) { modifiers = null; }
- _super.call(this, modifiers);
- this.name = name;
- this.value = value;
- this.type = type || value.type;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- DeclareVarStmt.prototype.visitStatement = function (visitor, context) {
- return visitor.visitDeclareVarStmt(this, context);
- };
- return DeclareVarStmt;
-}(Statement));
-function DeclareVarStmt_tsickle_Closure_declarations() {
- /** @type {?} */
- DeclareVarStmt.prototype.type;
- /** @type {?} */
- DeclareVarStmt.prototype.name;
- /** @type {?} */
- DeclareVarStmt.prototype.value;
-}
-var DeclareFunctionStmt = (function (_super) {
- __extends(DeclareFunctionStmt, _super);
- /**
- * @param {?} name
- * @param {?} params
- * @param {?} statements
- * @param {?=} type
- * @param {?=} modifiers
- */
- function DeclareFunctionStmt(name, params, statements, type, modifiers) {
- if (type === void 0) { type = null; }
- if (modifiers === void 0) { modifiers = null; }
- _super.call(this, modifiers);
- this.name = name;
- this.params = params;
- this.statements = statements;
- this.type = type;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- DeclareFunctionStmt.prototype.visitStatement = function (visitor, context) {
- return visitor.visitDeclareFunctionStmt(this, context);
- };
- return DeclareFunctionStmt;
-}(Statement));
-function DeclareFunctionStmt_tsickle_Closure_declarations() {
- /** @type {?} */
- DeclareFunctionStmt.prototype.name;
- /** @type {?} */
- DeclareFunctionStmt.prototype.params;
- /** @type {?} */
- DeclareFunctionStmt.prototype.statements;
- /** @type {?} */
- DeclareFunctionStmt.prototype.type;
+ };
}
-var ExpressionStatement = (function (_super) {
- __extends(ExpressionStatement, _super);
- /**
- * @param {?} expr
- */
- function ExpressionStatement(expr) {
- _super.call(this);
- this.expr = expr;
+
+FormResetDirectiveFn.$inject = [
+ 'validationManager'
+];
+
+angular.module('jcs-autoValidate').directive('form', FormResetDirectiveFn);
+
+function RegisterCustomFormControlFn() {
+ var findParentForm = function (el) {
+ var parent = el;
+ for (var i = 0; i <= 50; i += 1) {
+ if (parent !== undefined && parent.nodeName.toLowerCase() === 'form') {
+ break;
+ } else if (parent !== undefined) {
+ parent = angular.element(parent).parent()[0];
+ }
}
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- ExpressionStatement.prototype.visitStatement = function (visitor, context) {
- return visitor.visitExpressionStmt(this, context);
- };
- return ExpressionStatement;
-}(Statement));
-function ExpressionStatement_tsickle_Closure_declarations() {
- /** @type {?} */
- ExpressionStatement.prototype.expr;
-}
-var ReturnStatement = (function (_super) {
- __extends(ReturnStatement, _super);
- /**
- * @param {?} value
- */
- function ReturnStatement(value) {
- _super.call(this);
- this.value = value;
+
+ return parent;
+ };
+
+ return {
+ restrict: 'A',
+ link: function (scope, element) {
+ var frmEl = findParentForm(element.parent()[0]);
+ if (frmEl) {
+ frmEl.customHTMLFormControlsCollection = frmEl.customHTMLFormControlsCollection || [];
+ frmEl.customHTMLFormControlsCollection.push(element[0]);
+ }
}
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- ReturnStatement.prototype.visitStatement = function (visitor, context) {
- return visitor.visitReturnStmt(this, context);
- };
- return ReturnStatement;
-}(Statement));
-function ReturnStatement_tsickle_Closure_declarations() {
- /** @type {?} */
- ReturnStatement.prototype.value;
+ };
}
-var AbstractClassPart = (function () {
- /**
- * @param {?=} type
- * @param {?} modifiers
- */
- function AbstractClassPart(type, modifiers) {
- if (type === void 0) { type = null; }
- this.type = type;
- this.modifiers = modifiers;
- if (!modifiers) {
- this.modifiers = [];
+
+angular.module('jcs-autoValidate').directive('registerCustomFormControl', RegisterCustomFormControlFn);
+
+function SubmitDecorator($delegate, $parse, validationManager) {
+ $delegate[0].compile = function ($element, attrs) {
+ var fn = $parse(attrs.ngSubmit),
+ force = attrs.ngSubmitForce === 'true';
+
+ return function (scope, element) {
+ var formController = element.controller('form'),
+ resetListenerOffFn;
+
+ function handlerFn(event) {
+ scope.$apply(function () {
+ if (formController !== undefined &&
+ formController !== null &&
+ formController.autoValidateFormOptions &&
+ formController.autoValidateFormOptions.disabled === true) {
+ fn(scope, {
+ $event: event
+ });
+ } else {
+ if (formController.$setSubmitted === undefined) {
+ // we probably have angular <= 1.2
+ formController.$submitted = true;
+ }
+
+ if (validationManager.validateForm(element) || force === true) {
+ fn(scope, {
+ $event: event
+ });
+ }
+ }
+ });
+ }
+
+ function resetFormFn() {
+ if (element[0].reset) {
+ element[0].reset();
+ } else {
+ validationManager.resetForm(element);
}
- }
- /**
- * @param {?} modifier
- * @return {?}
- */
- AbstractClassPart.prototype.hasModifier = function (modifier) { return this.modifiers.indexOf(modifier) !== -1; };
- return AbstractClassPart;
-}());
-function AbstractClassPart_tsickle_Closure_declarations() {
- /** @type {?} */
- AbstractClassPart.prototype.type;
- /** @type {?} */
- AbstractClassPart.prototype.modifiers;
-}
-var ClassField = (function (_super) {
- __extends(ClassField, _super);
- /**
- * @param {?} name
- * @param {?=} type
- * @param {?=} modifiers
- */
- function ClassField(name, type, modifiers) {
- if (type === void 0) { type = null; }
- if (modifiers === void 0) { modifiers = null; }
- _super.call(this, type, modifiers);
- this.name = name;
- }
- return ClassField;
-}(AbstractClassPart));
-function ClassField_tsickle_Closure_declarations() {
- /** @type {?} */
- ClassField.prototype.name;
-}
-var ClassMethod = (function (_super) {
- __extends(ClassMethod, _super);
- /**
- * @param {?} name
- * @param {?} params
- * @param {?} body
- * @param {?=} type
- * @param {?=} modifiers
- */
- function ClassMethod(name, params, body, type, modifiers) {
- if (type === void 0) { type = null; }
- if (modifiers === void 0) { modifiers = null; }
- _super.call(this, type, modifiers);
- this.name = name;
- this.params = params;
- this.body = body;
- }
- return ClassMethod;
-}(AbstractClassPart));
-function ClassMethod_tsickle_Closure_declarations() {
- /** @type {?} */
- ClassMethod.prototype.name;
- /** @type {?} */
- ClassMethod.prototype.params;
- /** @type {?} */
- ClassMethod.prototype.body;
-}
-var ClassGetter = (function (_super) {
- __extends(ClassGetter, _super);
- /**
- * @param {?} name
- * @param {?} body
- * @param {?=} type
- * @param {?=} modifiers
- */
- function ClassGetter(name, body, type, modifiers) {
- if (type === void 0) { type = null; }
- if (modifiers === void 0) { modifiers = null; }
- _super.call(this, type, modifiers);
- this.name = name;
- this.body = body;
- }
- return ClassGetter;
-}(AbstractClassPart));
-function ClassGetter_tsickle_Closure_declarations() {
- /** @type {?} */
- ClassGetter.prototype.name;
- /** @type {?} */
- ClassGetter.prototype.body;
-}
-var ClassStmt = (function (_super) {
- __extends(ClassStmt, _super);
- /**
- * @param {?} name
- * @param {?} parent
- * @param {?} fields
- * @param {?} getters
- * @param {?} constructorMethod
- * @param {?} methods
- * @param {?=} modifiers
- */
- function ClassStmt(name, parent, fields, getters, constructorMethod, methods, modifiers) {
- if (modifiers === void 0) { modifiers = null; }
- _super.call(this, modifiers);
- this.name = name;
- this.parent = parent;
- this.fields = fields;
- this.getters = getters;
- this.constructorMethod = constructorMethod;
- this.methods = methods;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- ClassStmt.prototype.visitStatement = function (visitor, context) {
- return visitor.visitDeclareClassStmt(this, context);
- };
- return ClassStmt;
-}(Statement));
-function ClassStmt_tsickle_Closure_declarations() {
- /** @type {?} */
- ClassStmt.prototype.name;
- /** @type {?} */
- ClassStmt.prototype.parent;
- /** @type {?} */
- ClassStmt.prototype.fields;
- /** @type {?} */
- ClassStmt.prototype.getters;
- /** @type {?} */
- ClassStmt.prototype.constructorMethod;
- /** @type {?} */
- ClassStmt.prototype.methods;
-}
-var IfStmt = (function (_super) {
- __extends(IfStmt, _super);
- /**
- * @param {?} condition
- * @param {?} trueCase
- * @param {?=} falseCase
- */
- function IfStmt(condition, trueCase, falseCase) {
- if (falseCase === void 0) { falseCase = []; }
- _super.call(this);
- this.condition = condition;
- this.trueCase = trueCase;
- this.falseCase = falseCase;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- IfStmt.prototype.visitStatement = function (visitor, context) {
- return visitor.visitIfStmt(this, context);
- };
- return IfStmt;
-}(Statement));
-function IfStmt_tsickle_Closure_declarations() {
- /** @type {?} */
- IfStmt.prototype.condition;
- /** @type {?} */
- IfStmt.prototype.trueCase;
- /** @type {?} */
- IfStmt.prototype.falseCase;
-}
-var CommentStmt = (function (_super) {
- __extends(CommentStmt, _super);
- /**
- * @param {?} comment
- */
- function CommentStmt(comment) {
- _super.call(this);
- this.comment = comment;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- CommentStmt.prototype.visitStatement = function (visitor, context) {
- return visitor.visitCommentStmt(this, context);
- };
- return CommentStmt;
-}(Statement));
-function CommentStmt_tsickle_Closure_declarations() {
- /** @type {?} */
- CommentStmt.prototype.comment;
-}
-var TryCatchStmt = (function (_super) {
- __extends(TryCatchStmt, _super);
- /**
- * @param {?} bodyStmts
- * @param {?} catchStmts
- */
- function TryCatchStmt(bodyStmts, catchStmts) {
- _super.call(this);
- this.bodyStmts = bodyStmts;
- this.catchStmts = catchStmts;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- TryCatchStmt.prototype.visitStatement = function (visitor, context) {
- return visitor.visitTryCatchStmt(this, context);
+ }
+
+ if (formController && formController.autoValidateFormOptions) {
+ // allow the form to be reset programatically or via raising the event
+ // form:formName:reset
+ formController.autoValidateFormOptions.resetForm = resetFormFn;
+ if (formController.$name !== undefined && formController.$name !== '') {
+ resetListenerOffFn = scope.$on('form:' + formController.$name + ':reset', resetFormFn);
+ }
+ }
+
+ element.on('submit', handlerFn);
+ scope.$on('$destroy', function () {
+ element.off('submit', handlerFn);
+ if (resetListenerOffFn) {
+ resetListenerOffFn();
+ }
+ });
};
- return TryCatchStmt;
-}(Statement));
-function TryCatchStmt_tsickle_Closure_declarations() {
- /** @type {?} */
- TryCatchStmt.prototype.bodyStmts;
- /** @type {?} */
- TryCatchStmt.prototype.catchStmts;
+ };
+
+ return $delegate;
}
-var ThrowStmt = (function (_super) {
- __extends(ThrowStmt, _super);
- /**
- * @param {?} error
- */
- function ThrowStmt(error) {
- _super.call(this);
- this.error = error;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- ThrowStmt.prototype.visitStatement = function (visitor, context) {
- return visitor.visitThrowStmt(this, context);
- };
- return ThrowStmt;
-}(Statement));
-function ThrowStmt_tsickle_Closure_declarations() {
- /** @type {?} */
- ThrowStmt.prototype.error;
+
+SubmitDecorator.$inject = [
+ '$delegate',
+ '$parse',
+ 'validationManager'
+];
+
+function ProviderFn($provide) {
+ $provide.decorator('ngSubmitDirective', SubmitDecorator);
}
-var ExpressionTransformer = (function () {
- function ExpressionTransformer() {
- }
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitReadVarExpr = function (ast, context) { return ast; };
- /**
- * @param {?} expr
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitWriteVarExpr = function (expr, context) {
- return new WriteVarExpr(expr.name, expr.value.visitExpression(this, context));
- };
- /**
- * @param {?} expr
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitWriteKeyExpr = function (expr, context) {
- return new WriteKeyExpr(expr.receiver.visitExpression(this, context), expr.index.visitExpression(this, context), expr.value.visitExpression(this, context));
- };
- /**
- * @param {?} expr
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitWritePropExpr = function (expr, context) {
- return new WritePropExpr(expr.receiver.visitExpression(this, context), expr.name, expr.value.visitExpression(this, context));
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitInvokeMethodExpr = function (ast, context) {
- var /** @type {?} */ method = ast.builtin || ast.name;
- return new InvokeMethodExpr(ast.receiver.visitExpression(this, context), method, this.visitAllExpressions(ast.args, context), ast.type);
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitInvokeFunctionExpr = function (ast, context) {
- return new InvokeFunctionExpr(ast.fn.visitExpression(this, context), this.visitAllExpressions(ast.args, context), ast.type);
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitInstantiateExpr = function (ast, context) {
- return new InstantiateExpr(ast.classExpr.visitExpression(this, context), this.visitAllExpressions(ast.args, context), ast.type);
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitLiteralExpr = function (ast, context) { return ast; };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitExternalExpr = function (ast, context) { return ast; };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitConditionalExpr = function (ast, context) {
- return new ConditionalExpr(ast.condition.visitExpression(this, context), ast.trueCase.visitExpression(this, context), ast.falseCase.visitExpression(this, context));
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitNotExpr = function (ast, context) {
- return new NotExpr(ast.condition.visitExpression(this, context));
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitCastExpr = function (ast, context) {
- return new CastExpr(ast.value.visitExpression(this, context), context);
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitFunctionExpr = function (ast, context) {
- // Don't descend into nested functions
- return ast;
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitBinaryOperatorExpr = function (ast, context) {
- return new BinaryOperatorExpr(ast.operator, ast.lhs.visitExpression(this, context), ast.rhs.visitExpression(this, context), ast.type);
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitReadPropExpr = function (ast, context) {
- return new ReadPropExpr(ast.receiver.visitExpression(this, context), ast.name, ast.type);
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitReadKeyExpr = function (ast, context) {
- return new ReadKeyExpr(ast.receiver.visitExpression(this, context), ast.index.visitExpression(this, context), ast.type);
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitLiteralArrayExpr = function (ast, context) {
- return new LiteralArrayExpr(this.visitAllExpressions(ast.entries, context));
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitLiteralMapExpr = function (ast, context) {
- var _this = this;
- var /** @type {?} */ entries = ast.entries.map(function (entry) { return new LiteralMapEntry(entry.key, entry.value.visitExpression(_this, context), entry.quoted); });
- return new LiteralMapExpr(entries);
- };
- /**
- * @param {?} exprs
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitAllExpressions = function (exprs, context) {
- var _this = this;
- return exprs.map(function (expr) { return expr.visitExpression(_this, context); });
- };
- /**
- * @param {?} stmt
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitDeclareVarStmt = function (stmt, context) {
- return new DeclareVarStmt(stmt.name, stmt.value.visitExpression(this, context), stmt.type, stmt.modifiers);
- };
- /**
- * @param {?} stmt
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitDeclareFunctionStmt = function (stmt, context) {
- // Don't descend into nested functions
- return stmt;
- };
- /**
- * @param {?} stmt
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitExpressionStmt = function (stmt, context) {
- return new ExpressionStatement(stmt.expr.visitExpression(this, context));
- };
- /**
- * @param {?} stmt
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitReturnStmt = function (stmt, context) {
- return new ReturnStatement(stmt.value.visitExpression(this, context));
- };
- /**
- * @param {?} stmt
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitDeclareClassStmt = function (stmt, context) {
- // Don't descend into nested functions
- return stmt;
- };
- /**
- * @param {?} stmt
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitIfStmt = function (stmt, context) {
- return new IfStmt(stmt.condition.visitExpression(this, context), this.visitAllStatements(stmt.trueCase, context), this.visitAllStatements(stmt.falseCase, context));
- };
- /**
- * @param {?} stmt
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitTryCatchStmt = function (stmt, context) {
- return new TryCatchStmt(this.visitAllStatements(stmt.bodyStmts, context), this.visitAllStatements(stmt.catchStmts, context));
- };
- /**
- * @param {?} stmt
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitThrowStmt = function (stmt, context) {
- return new ThrowStmt(stmt.error.visitExpression(this, context));
- };
- /**
- * @param {?} stmt
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitCommentStmt = function (stmt, context) { return stmt; };
- /**
- * @param {?} stmts
- * @param {?} context
- * @return {?}
- */
- ExpressionTransformer.prototype.visitAllStatements = function (stmts, context) {
- var _this = this;
- return stmts.map(function (stmt) { return stmt.visitStatement(_this, context); });
- };
- return ExpressionTransformer;
-}());
-var RecursiveExpressionVisitor = (function () {
- function RecursiveExpressionVisitor() {
- }
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitReadVarExpr = function (ast, context) { return ast; };
- /**
- * @param {?} expr
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitWriteVarExpr = function (expr, context) {
- expr.value.visitExpression(this, context);
- return expr;
- };
- /**
- * @param {?} expr
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitWriteKeyExpr = function (expr, context) {
- expr.receiver.visitExpression(this, context);
- expr.index.visitExpression(this, context);
- expr.value.visitExpression(this, context);
- return expr;
- };
- /**
- * @param {?} expr
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitWritePropExpr = function (expr, context) {
- expr.receiver.visitExpression(this, context);
- expr.value.visitExpression(this, context);
- return expr;
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitInvokeMethodExpr = function (ast, context) {
- ast.receiver.visitExpression(this, context);
- this.visitAllExpressions(ast.args, context);
- return ast;
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitInvokeFunctionExpr = function (ast, context) {
- ast.fn.visitExpression(this, context);
- this.visitAllExpressions(ast.args, context);
- return ast;
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitInstantiateExpr = function (ast, context) {
- ast.classExpr.visitExpression(this, context);
- this.visitAllExpressions(ast.args, context);
- return ast;
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitLiteralExpr = function (ast, context) { return ast; };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitExternalExpr = function (ast, context) { return ast; };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitConditionalExpr = function (ast, context) {
- ast.condition.visitExpression(this, context);
- ast.trueCase.visitExpression(this, context);
- ast.falseCase.visitExpression(this, context);
- return ast;
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitNotExpr = function (ast, context) {
- ast.condition.visitExpression(this, context);
- return ast;
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitCastExpr = function (ast, context) {
- ast.value.visitExpression(this, context);
- return ast;
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitFunctionExpr = function (ast, context) { return ast; };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitBinaryOperatorExpr = function (ast, context) {
- ast.lhs.visitExpression(this, context);
- ast.rhs.visitExpression(this, context);
- return ast;
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitReadPropExpr = function (ast, context) {
- ast.receiver.visitExpression(this, context);
- return ast;
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitReadKeyExpr = function (ast, context) {
- ast.receiver.visitExpression(this, context);
- ast.index.visitExpression(this, context);
- return ast;
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitLiteralArrayExpr = function (ast, context) {
- this.visitAllExpressions(ast.entries, context);
- return ast;
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitLiteralMapExpr = function (ast, context) {
- var _this = this;
- ast.entries.forEach(function (entry) { return entry.value.visitExpression(_this, context); });
- return ast;
- };
- /**
- * @param {?} exprs
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitAllExpressions = function (exprs, context) {
- var _this = this;
- exprs.forEach(function (expr) { return expr.visitExpression(_this, context); });
- };
- /**
- * @param {?} stmt
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitDeclareVarStmt = function (stmt, context) {
- stmt.value.visitExpression(this, context);
- return stmt;
- };
- /**
- * @param {?} stmt
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitDeclareFunctionStmt = function (stmt, context) {
- // Don't descend into nested functions
- return stmt;
- };
- /**
- * @param {?} stmt
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitExpressionStmt = function (stmt, context) {
- stmt.expr.visitExpression(this, context);
- return stmt;
- };
- /**
- * @param {?} stmt
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitReturnStmt = function (stmt, context) {
- stmt.value.visitExpression(this, context);
- return stmt;
- };
- /**
- * @param {?} stmt
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitDeclareClassStmt = function (stmt, context) {
- // Don't descend into nested functions
- return stmt;
- };
- /**
- * @param {?} stmt
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitIfStmt = function (stmt, context) {
- stmt.condition.visitExpression(this, context);
- this.visitAllStatements(stmt.trueCase, context);
- this.visitAllStatements(stmt.falseCase, context);
- return stmt;
- };
- /**
- * @param {?} stmt
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitTryCatchStmt = function (stmt, context) {
- this.visitAllStatements(stmt.bodyStmts, context);
- this.visitAllStatements(stmt.catchStmts, context);
- return stmt;
- };
- /**
- * @param {?} stmt
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitThrowStmt = function (stmt, context) {
- stmt.error.visitExpression(this, context);
- return stmt;
- };
- /**
- * @param {?} stmt
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitCommentStmt = function (stmt, context) { return stmt; };
- /**
- * @param {?} stmts
- * @param {?} context
- * @return {?}
- */
- RecursiveExpressionVisitor.prototype.visitAllStatements = function (stmts, context) {
- var _this = this;
- stmts.forEach(function (stmt) { return stmt.visitStatement(_this, context); });
- };
- return RecursiveExpressionVisitor;
-}());
-/**
- * @param {?} varName
- * @param {?} newValue
- * @param {?} expression
- * @return {?}
- */
-function replaceVarInExpression(varName, newValue, expression) {
- var /** @type {?} */ transformer = new _ReplaceVariableTransformer(varName, newValue);
- return expression.visitExpression(transformer, null);
-}
-var _ReplaceVariableTransformer = (function (_super) {
- __extends(_ReplaceVariableTransformer, _super);
- /**
- * @param {?} _varName
- * @param {?} _newValue
- */
- function _ReplaceVariableTransformer(_varName, _newValue) {
- _super.call(this);
- this._varName = _varName;
- this._newValue = _newValue;
- }
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- _ReplaceVariableTransformer.prototype.visitReadVarExpr = function (ast, context) {
- return ast.name == this._varName ? this._newValue : ast;
- };
- return _ReplaceVariableTransformer;
-}(ExpressionTransformer));
-function _ReplaceVariableTransformer_tsickle_Closure_declarations() {
- /** @type {?} */
- _ReplaceVariableTransformer.prototype._varName;
- /** @type {?} */
- _ReplaceVariableTransformer.prototype._newValue;
-}
-/**
- * @param {?} stmts
- * @return {?}
- */
-function findReadVarNames(stmts) {
- var /** @type {?} */ finder = new _VariableFinder();
- finder.visitAllStatements(stmts, null);
- return finder.varNames;
-}
-var _VariableFinder = (function (_super) {
- __extends(_VariableFinder, _super);
- function _VariableFinder() {
- _super.apply(this, arguments);
- this.varNames = new Set();
- }
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- _VariableFinder.prototype.visitReadVarExpr = function (ast, context) {
- this.varNames.add(ast.name);
- return null;
- };
- return _VariableFinder;
-}(RecursiveExpressionVisitor));
-function _VariableFinder_tsickle_Closure_declarations() {
- /** @type {?} */
- _VariableFinder.prototype.varNames;
-}
-/**
- * @param {?} name
- * @param {?=} type
- * @return {?}
- */
-function variable(name, type) {
- if (type === void 0) { type = null; }
- return new ReadVarExpr(name, type);
-}
-/**
- * @param {?} id
- * @param {?=} typeParams
- * @return {?}
- */
-function importExpr(id, typeParams) {
- if (typeParams === void 0) { typeParams = null; }
- return new ExternalExpr(id, null, typeParams);
-}
-/**
- * @param {?} id
- * @param {?=} typeParams
- * @param {?=} typeModifiers
- * @return {?}
- */
-function importType(id, typeParams, typeModifiers) {
- if (typeParams === void 0) { typeParams = null; }
- if (typeModifiers === void 0) { typeModifiers = null; }
- return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__facade_lang__["c" /* isPresent */])(id) ? expressionType(importExpr(id), typeParams, typeModifiers) : null;
-}
-/**
- * @param {?} expr
- * @param {?=} typeParams
- * @param {?=} typeModifiers
- * @return {?}
- */
-function expressionType(expr, typeParams, typeModifiers) {
- if (typeParams === void 0) { typeParams = null; }
- if (typeModifiers === void 0) { typeModifiers = null; }
- return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__facade_lang__["c" /* isPresent */])(expr) ? new ExpressionType(expr, typeParams, typeModifiers) : null;
-}
-/**
- * @param {?} values
- * @param {?=} type
- * @return {?}
- */
-function literalArr(values, type) {
- if (type === void 0) { type = null; }
- return new LiteralArrayExpr(values, type);
-}
-/**
- * @param {?} values
- * @param {?=} type
- * @param {?=} quoted
- * @return {?}
- */
-function literalMap(values, type, quoted) {
- if (type === void 0) { type = null; }
- if (quoted === void 0) { quoted = false; }
- return new LiteralMapExpr(values.map(function (entry) { return new LiteralMapEntry(entry[0], entry[1], quoted); }), type);
-}
-/**
- * @param {?} expr
- * @return {?}
- */
-function not(expr) {
- return new NotExpr(expr);
-}
-/**
- * @param {?} params
- * @param {?} body
- * @param {?=} type
- * @return {?}
- */
-function fn(params, body, type) {
- if (type === void 0) { type = null; }
- return new FunctionExpr(params, body, type);
-}
-/**
- * @param {?} value
- * @param {?=} type
- * @return {?}
- */
-function literal(value, type) {
- if (type === void 0) { type = null; }
- return new LiteralExpr(value, type);
-}
-//# sourceMappingURL=output_ast.js.map
-
-/***/ }),
-/* 11 */
-/***/ (function(module, exports) {
-module.exports = function(exec){
- try {
- return !!exec();
- } catch(e){
- return true;
- }
-};
+ProviderFn.$inject = [
+ '$provide'
+];
-/***/ }),
-/* 12 */
-/***/ (function(module, exports, __webpack_require__) {
+angular.module('jcs-autoValidate').config(ProviderFn);
-"use strict";
+angular.module('jcs-autoValidate').config(['$provide',
+ function ($provide) {
+ $provide.decorator('ngModelDirective', [
+ '$timeout',
+ '$delegate',
+ 'validationManager',
+ 'jcs-debounce',
+ function ($timeout, $delegate, validationManager, debounce) {
+ var directive = $delegate[0],
+ link = directive.link || directive.compile;
-/** Predicates
- *
- * These predicates return true/false based on the input.
- * Although these functions are exported, they are subject to change without notice.
- *
- * @module common_predicates
- */ /** */
-var hof_1 = __webpack_require__(16);
-var toStr = Object.prototype.toString;
-var tis = function (t) { return function (x) { return typeof (x) === t; }; };
-exports.isUndefined = tis('undefined');
-exports.isDefined = hof_1.not(exports.isUndefined);
-exports.isNull = function (o) { return o === null; };
-exports.isNullOrUndefined = hof_1.or(exports.isNull, exports.isUndefined);
-exports.isFunction = tis('function');
-exports.isNumber = tis('number');
-exports.isString = tis('string');
-exports.isObject = function (x) { return x !== null && typeof x === 'object'; };
-exports.isArray = Array.isArray;
-exports.isDate = (function (x) { return toStr.call(x) === '[object Date]'; });
-exports.isRegExp = (function (x) { return toStr.call(x) === '[object RegExp]'; });
-/**
- * Predicate which checks if a value is injectable
- *
- * A value is "injectable" if it is a function, or if it is an ng1 array-notation-style array
- * where all the elements in the array are Strings, except the last one, which is a Function
- */
-function isInjectable(val) {
- if (exports.isArray(val) && val.length) {
- var head = val.slice(0, -1), tail = val.slice(-1);
- return !(head.filter(hof_1.not(exports.isString)).length || tail.filter(hof_1.not(exports.isFunction)).length);
- }
- return exports.isFunction(val);
-}
-exports.isInjectable = isInjectable;
-/**
- * Predicate which checks if a value looks like a Promise
- *
- * It is probably a Promise if it's an object, and it has a `then` property which is a Function
- */
-exports.isPromise = hof_1.and(exports.isObject, hof_1.pipe(hof_1.prop('then'), exports.isFunction));
-//# sourceMappingURL=predicates.js.map
+ directive.compile = function (el) {
+ var supportsNgModelOptions = angular.version.major >= 1 && angular.version.minor >= 3,
+ originalLink = link;
-/***/ }),
-/* 13 */
-/***/ (function(module, exports, __webpack_require__) {
+ // in the RC of 1.3 there is no directive.link only the directive.compile which
+ // needs to be invoked to get at the link functions.
+ if (supportsNgModelOptions && angular.isFunction(link)) {
+ originalLink = link(el);
+ }
-"use strict";
+ return {
+ pre: function (scope, element, attrs, ctrls) {
+ var ngModelCtrl = ctrls[0],
+ frmCtrl = ctrls[1],
+ ngModelOptions = attrs.ngModelOptions === undefined ? undefined : scope.$eval(attrs.ngModelOptions),
+ setValidity = ngModelCtrl.$setValidity,
+ setPristine = ngModelCtrl.$setPristine,
+ setValidationState = debounce.debounce(function () {
+ var validateOptions = frmCtrl !== undefined && frmCtrl !== null ? frmCtrl.autoValidateFormOptions : undefined;
+ validationManager.validateElement(ngModelCtrl, element, validateOptions);
+ }, 100);
-var __extends = (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 Observable_1 = __webpack_require__(0);
-var Subscriber_1 = __webpack_require__(3);
-var Subscription_1 = __webpack_require__(23);
-var ObjectUnsubscribedError_1 = __webpack_require__(205);
-var SubjectSubscription_1 = __webpack_require__(461);
-var rxSubscriber_1 = __webpack_require__(203);
-/**
- * @class SubjectSubscriber
- */
-var SubjectSubscriber = (function (_super) {
- __extends(SubjectSubscriber, _super);
- function SubjectSubscriber(destination) {
- _super.call(this, destination);
- this.destination = destination;
- }
- return SubjectSubscriber;
-}(Subscriber_1.Subscriber));
-exports.SubjectSubscriber = SubjectSubscriber;
-/**
- * @class Subject
- */
-var Subject = (function (_super) {
- __extends(Subject, _super);
- function Subject() {
- _super.call(this);
- this.observers = [];
- this.closed = false;
- this.isStopped = false;
- this.hasError = false;
- this.thrownError = null;
- }
- Subject.prototype[rxSubscriber_1.$$rxSubscriber] = function () {
- return new SubjectSubscriber(this);
- };
- Subject.prototype.lift = function (operator) {
- var subject = new AnonymousSubject(this, this);
- subject.operator = operator;
- return subject;
- };
- Subject.prototype.next = function (value) {
- if (this.closed) {
- throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();
- }
- if (!this.isStopped) {
- var observers = this.observers;
- var len = observers.length;
- var copy = observers.slice();
- for (var i = 0; i < len; i++) {
- copy[i].next(value);
- }
- }
- };
- Subject.prototype.error = function (err) {
- if (this.closed) {
- throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();
- }
- this.hasError = true;
- this.thrownError = err;
- this.isStopped = true;
- var observers = this.observers;
- var len = observers.length;
- var copy = observers.slice();
- for (var i = 0; i < len; i++) {
- copy[i].error(err);
- }
- this.observers.length = 0;
- };
- Subject.prototype.complete = function () {
- if (this.closed) {
- throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();
- }
- this.isStopped = true;
- var observers = this.observers;
- var len = observers.length;
- var copy = observers.slice();
- for (var i = 0; i < len; i++) {
- copy[i].complete();
- }
- this.observers.length = 0;
- };
- Subject.prototype.unsubscribe = function () {
- this.isStopped = true;
- this.closed = true;
- this.observers = null;
- };
- Subject.prototype._trySubscribe = function (subscriber) {
- if (this.closed) {
- throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();
- }
- else {
- return _super.prototype._trySubscribe.call(this, subscriber);
- }
- };
- Subject.prototype._subscribe = function (subscriber) {
- if (this.closed) {
- throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();
- }
- else if (this.hasError) {
- subscriber.error(this.thrownError);
- return Subscription_1.Subscription.EMPTY;
- }
- else if (this.isStopped) {
- subscriber.complete();
- return Subscription_1.Subscription.EMPTY;
- }
- else {
- this.observers.push(subscriber);
- return new SubjectSubscription_1.SubjectSubscription(this, subscriber);
- }
- };
- Subject.prototype.asObservable = function () {
- var observable = new Observable_1.Observable();
- observable.source = this;
- return observable;
- };
- Subject.create = function (destination, source) {
- return new AnonymousSubject(destination, source);
- };
- return Subject;
-}(Observable_1.Observable));
-exports.Subject = Subject;
-/**
- * @class AnonymousSubject
- */
-var AnonymousSubject = (function (_super) {
- __extends(AnonymousSubject, _super);
- function AnonymousSubject(destination, source) {
- _super.call(this);
- this.destination = destination;
- this.source = source;
- }
- AnonymousSubject.prototype.next = function (value) {
- var destination = this.destination;
- if (destination && destination.next) {
- destination.next(value);
- }
- };
- AnonymousSubject.prototype.error = function (err) {
- var destination = this.destination;
- if (destination && destination.error) {
- this.destination.error(err);
- }
- };
- AnonymousSubject.prototype.complete = function () {
- var destination = this.destination;
- if (destination && destination.complete) {
- this.destination.complete();
- }
- };
- AnonymousSubject.prototype._subscribe = function (subscriber) {
- var source = this.source;
- if (source) {
- return this.source.subscribe(subscriber);
- }
- else {
- return Subscription_1.Subscription.EMPTY;
- }
- };
- return AnonymousSubject;
-}(Subject));
-exports.AnonymousSubject = AnonymousSubject;
-//# sourceMappingURL=Subject.js.map
+ if (attrs.formnovalidate === undefined &&
+ (frmCtrl !== undefined && frmCtrl !== null && frmCtrl.autoValidateFormOptions &&
+ frmCtrl.autoValidateFormOptions.disabled === false)) {
+ if (!supportsNgModelOptions || ngModelOptions === undefined || ngModelOptions.updateOn === undefined || ngModelOptions.updateOn === '') {
+ ngModelCtrl.$setValidity = function (validationErrorKey, isValid) {
+ setValidity.call(ngModelCtrl, validationErrorKey, isValid);
+ setValidationState();
+ };
+ } else {
+ element.on(ngModelOptions.updateOn, function () {
+ setValidationState();
+ });
-/***/ }),
-/* 14 */
-/***/ (function(module, exports) {
+ scope.$on('$destroy', function () {
+ element.off(ngModelOptions.updateOn);
+ });
+ }
-module.exports = function(it){
- return typeof it === 'object' ? it !== null : typeof it === 'function';
-};
+ // We override this so we can reset the element state when it is called.
+ ngModelCtrl.$setPristine = function () {
+ setPristine.call(ngModelCtrl);
+ validationManager.resetElement(element);
+ };
-/***/ }),
-/* 15 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ ngModelCtrl.autoValidated = true;
+ }
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__aot_static_symbol__ = __webpack_require__(65);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__facade_collection__ = __webpack_require__(78);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__facade_lang__ = __webpack_require__(6);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__private_import_core__ = __webpack_require__(17);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__selector__ = __webpack_require__(162);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util__ = __webpack_require__(32);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return CompileAnimationEntryMetadata; });
-/* unused harmony export CompileAnimationStateMetadata */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return CompileAnimationStateDeclarationMetadata; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return CompileAnimationStateTransitionMetadata; });
-/* unused harmony export CompileAnimationMetadata */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return CompileAnimationKeyframesSequenceMetadata; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return CompileAnimationStyleMetadata; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return CompileAnimationAnimateMetadata; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return CompileAnimationWithStepsMetadata; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return CompileAnimationSequenceMetadata; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return CompileAnimationGroupMetadata; });
-/* harmony export (immutable) */ __webpack_exports__["a"] = identifierName;
-/* harmony export (immutable) */ __webpack_exports__["i"] = identifierModuleUrl;
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return CompileSummaryKind; });
-/* harmony export (immutable) */ __webpack_exports__["k"] = tokenName;
-/* harmony export (immutable) */ __webpack_exports__["j"] = tokenReference;
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return CompileStylesheetMetadata; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return CompileTemplateMetadata; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return CompileDirectiveMetadata; });
-/* harmony export (immutable) */ __webpack_exports__["v"] = createHostComponentMeta;
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return CompilePipeMetadata; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return CompileNgModuleMetadata; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return TransitiveCompileNgModuleMetadata; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return ProviderMeta; });
-/**
- * @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 = (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 __());
-};
+ ngModelCtrl.setExternalValidation = function (errorMsgKey, errorMessage, addToModelErrors) {
+ if (addToModelErrors) {
+ var collection = ngModelCtrl.$error || ngModelCtrl.$errors;
+ collection[errorMsgKey] = false;
+ }
+ ngModelCtrl.externalErrors = ngModelCtrl.externalErrors || {};
+ ngModelCtrl.externalErrors[errorMsgKey] = false;
+ validationManager.setElementValidationError(element, errorMsgKey, errorMessage);
+ };
+ ngModelCtrl.removeExternalValidation = function (errorMsgKey, addToModelErrors) {
+ if (addToModelErrors) {
+ var collection = ngModelCtrl.$error || ngModelCtrl.$errors;
+ delete collection[errorMsgKey];
+ }
+ if (ngModelCtrl.externalErrors) {
+ delete ngModelCtrl.externalErrors[errorMsgKey];
+ }
+ validationManager.resetElement(element);
+ };
+ ngModelCtrl.removeAllExternalValidation = function () {
+ if (ngModelCtrl.externalErrors) {
+ var errorCollection = ngModelCtrl.$error || ngModelCtrl.$errors;
+ angular.forEach(ngModelCtrl.externalErrors, function (value, key) {
+ delete errorCollection[key];
+ });
+ ngModelCtrl.externalErrors = {};
-// group 0: "[prop] or (event) or @trigger"
-// group 1: "prop" from "[prop]"
-// group 2: "event" from "(event)"
-// group 3: "@trigger" from "@trigger"
-var /** @type {?} */ HOST_REG_EXP = /^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;
-var CompileAnimationEntryMetadata = (function () {
- /**
- * @param {?=} name
- * @param {?=} definitions
- */
- function CompileAnimationEntryMetadata(name, definitions) {
- if (name === void 0) { name = null; }
- if (definitions === void 0) { definitions = null; }
- this.name = name;
- this.definitions = definitions;
- }
- return CompileAnimationEntryMetadata;
-}());
-function CompileAnimationEntryMetadata_tsickle_Closure_declarations() {
- /** @type {?} */
- CompileAnimationEntryMetadata.prototype.name;
- /** @type {?} */
- CompileAnimationEntryMetadata.prototype.definitions;
-}
-/**
- * @abstract
- */
-var CompileAnimationStateMetadata = (function () {
- function CompileAnimationStateMetadata() {
- }
- return CompileAnimationStateMetadata;
-}());
-var CompileAnimationStateDeclarationMetadata = (function (_super) {
- __extends(CompileAnimationStateDeclarationMetadata, _super);
- /**
- * @param {?} stateNameExpr
- * @param {?} styles
- */
- function CompileAnimationStateDeclarationMetadata(stateNameExpr, styles) {
- _super.call(this);
- this.stateNameExpr = stateNameExpr;
- this.styles = styles;
- }
- return CompileAnimationStateDeclarationMetadata;
-}(CompileAnimationStateMetadata));
-function CompileAnimationStateDeclarationMetadata_tsickle_Closure_declarations() {
- /** @type {?} */
- CompileAnimationStateDeclarationMetadata.prototype.stateNameExpr;
- /** @type {?} */
- CompileAnimationStateDeclarationMetadata.prototype.styles;
-}
-var CompileAnimationStateTransitionMetadata = (function (_super) {
- __extends(CompileAnimationStateTransitionMetadata, _super);
- /**
- * @param {?} stateChangeExpr
- * @param {?} steps
- */
- function CompileAnimationStateTransitionMetadata(stateChangeExpr, steps) {
- _super.call(this);
- this.stateChangeExpr = stateChangeExpr;
- this.steps = steps;
- }
- return CompileAnimationStateTransitionMetadata;
-}(CompileAnimationStateMetadata));
-function CompileAnimationStateTransitionMetadata_tsickle_Closure_declarations() {
- /** @type {?} */
- CompileAnimationStateTransitionMetadata.prototype.stateChangeExpr;
- /** @type {?} */
- CompileAnimationStateTransitionMetadata.prototype.steps;
-}
-/**
- * @abstract
- */
-var CompileAnimationMetadata = (function () {
- function CompileAnimationMetadata() {
- }
- return CompileAnimationMetadata;
-}());
-var CompileAnimationKeyframesSequenceMetadata = (function (_super) {
- __extends(CompileAnimationKeyframesSequenceMetadata, _super);
- /**
- * @param {?=} steps
- */
- function CompileAnimationKeyframesSequenceMetadata(steps) {
- if (steps === void 0) { steps = []; }
- _super.call(this);
- this.steps = steps;
- }
- return CompileAnimationKeyframesSequenceMetadata;
-}(CompileAnimationMetadata));
-function CompileAnimationKeyframesSequenceMetadata_tsickle_Closure_declarations() {
- /** @type {?} */
- CompileAnimationKeyframesSequenceMetadata.prototype.steps;
-}
-var CompileAnimationStyleMetadata = (function (_super) {
- __extends(CompileAnimationStyleMetadata, _super);
- /**
- * @param {?} offset
- * @param {?=} styles
- */
- function CompileAnimationStyleMetadata(offset, styles) {
- if (styles === void 0) { styles = null; }
- _super.call(this);
- this.offset = offset;
- this.styles = styles;
- }
- return CompileAnimationStyleMetadata;
-}(CompileAnimationMetadata));
-function CompileAnimationStyleMetadata_tsickle_Closure_declarations() {
- /** @type {?} */
- CompileAnimationStyleMetadata.prototype.offset;
- /** @type {?} */
- CompileAnimationStyleMetadata.prototype.styles;
-}
-var CompileAnimationAnimateMetadata = (function (_super) {
- __extends(CompileAnimationAnimateMetadata, _super);
- /**
- * @param {?=} timings
- * @param {?=} styles
- */
- function CompileAnimationAnimateMetadata(timings, styles) {
- if (timings === void 0) { timings = 0; }
- if (styles === void 0) { styles = null; }
- _super.call(this);
- this.timings = timings;
- this.styles = styles;
- }
- return CompileAnimationAnimateMetadata;
-}(CompileAnimationMetadata));
-function CompileAnimationAnimateMetadata_tsickle_Closure_declarations() {
- /** @type {?} */
- CompileAnimationAnimateMetadata.prototype.timings;
- /** @type {?} */
- CompileAnimationAnimateMetadata.prototype.styles;
-}
-/**
- * @abstract
- */
-var CompileAnimationWithStepsMetadata = (function (_super) {
- __extends(CompileAnimationWithStepsMetadata, _super);
- /**
- * @param {?=} steps
- */
- function CompileAnimationWithStepsMetadata(steps) {
- if (steps === void 0) { steps = null; }
- _super.call(this);
- this.steps = steps;
- }
- return CompileAnimationWithStepsMetadata;
-}(CompileAnimationMetadata));
-function CompileAnimationWithStepsMetadata_tsickle_Closure_declarations() {
- /** @type {?} */
- CompileAnimationWithStepsMetadata.prototype.steps;
-}
-var CompileAnimationSequenceMetadata = (function (_super) {
- __extends(CompileAnimationSequenceMetadata, _super);
- /**
- * @param {?=} steps
- */
- function CompileAnimationSequenceMetadata(steps) {
- if (steps === void 0) { steps = null; }
- _super.call(this, steps);
- }
- return CompileAnimationSequenceMetadata;
-}(CompileAnimationWithStepsMetadata));
-var CompileAnimationGroupMetadata = (function (_super) {
- __extends(CompileAnimationGroupMetadata, _super);
- /**
- * @param {?=} steps
- */
- function CompileAnimationGroupMetadata(steps) {
- if (steps === void 0) { steps = null; }
- _super.call(this, steps);
- }
- return CompileAnimationGroupMetadata;
-}(CompileAnimationWithStepsMetadata));
-/**
- * @param {?} name
- * @return {?}
- */
-function _sanitizeIdentifier(name) {
- return name.replace(/\W/g, '_');
-}
-var /** @type {?} */ _anonymousTypeIndex = 0;
-/**
- * @param {?} compileIdentifier
- * @return {?}
- */
-function identifierName(compileIdentifier) {
- if (!compileIdentifier || !compileIdentifier.reference) {
- return null;
- }
- var /** @type {?} */ ref = compileIdentifier.reference;
- if (ref instanceof __WEBPACK_IMPORTED_MODULE_1__aot_static_symbol__["a" /* StaticSymbol */]) {
- return ref.name;
- }
- if (ref['__anonymousType']) {
- return ref['__anonymousType'];
- }
- var /** @type {?} */ identifier = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__facade_lang__["e" /* stringify */])(ref);
- if (identifier.indexOf('(') >= 0) {
- // case: anonymous functions!
- identifier = "anonymous_" + _anonymousTypeIndex++;
- ref['__anonymousType'] = identifier;
- }
- else {
- identifier = _sanitizeIdentifier(identifier);
- }
- return identifier;
-}
-/**
- * @param {?} compileIdentifier
- * @return {?}
- */
-function identifierModuleUrl(compileIdentifier) {
- var /** @type {?} */ ref = compileIdentifier.reference;
- if (ref instanceof __WEBPACK_IMPORTED_MODULE_1__aot_static_symbol__["a" /* StaticSymbol */]) {
- return ref.filePath;
- }
- return __WEBPACK_IMPORTED_MODULE_4__private_import_core__["c" /* reflector */].importUri(ref);
-}
-var CompileSummaryKind = {};
-CompileSummaryKind.Pipe = 0;
-CompileSummaryKind.Directive = 1;
-CompileSummaryKind.NgModule = 2;
-CompileSummaryKind.Injectable = 3;
-CompileSummaryKind[CompileSummaryKind.Pipe] = "Pipe";
-CompileSummaryKind[CompileSummaryKind.Directive] = "Directive";
-CompileSummaryKind[CompileSummaryKind.NgModule] = "NgModule";
-CompileSummaryKind[CompileSummaryKind.Injectable] = "Injectable";
-/**
- * @param {?} token
- * @return {?}
- */
-function tokenName(token) {
- return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__facade_lang__["c" /* isPresent */])(token.value) ? _sanitizeIdentifier(token.value) :
- identifierName(token.identifier);
-}
-/**
- * @param {?} token
- * @return {?}
- */
-function tokenReference(token) {
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__facade_lang__["c" /* isPresent */])(token.identifier)) {
- return token.identifier.reference;
- }
- else {
- return token.value;
- }
-}
-/**
- * Metadata about a stylesheet
- */
-var CompileStylesheetMetadata = (function () {
- /**
- * @param {?=} __0
- */
- function CompileStylesheetMetadata(_a) {
- var _b = _a === void 0 ? {} : _a, moduleUrl = _b.moduleUrl, styles = _b.styles, styleUrls = _b.styleUrls;
- this.moduleUrl = moduleUrl;
- this.styles = _normalizeArray(styles);
- this.styleUrls = _normalizeArray(styleUrls);
- }
- return CompileStylesheetMetadata;
-}());
-function CompileStylesheetMetadata_tsickle_Closure_declarations() {
- /** @type {?} */
- CompileStylesheetMetadata.prototype.moduleUrl;
- /** @type {?} */
- CompileStylesheetMetadata.prototype.styles;
- /** @type {?} */
- CompileStylesheetMetadata.prototype.styleUrls;
-}
-/**
- * Metadata regarding compilation of a template.
- */
-var CompileTemplateMetadata = (function () {
- /**
- * @param {?=} __0
- */
- function CompileTemplateMetadata(_a) {
- var _b = _a === void 0 ? {} : _a, encapsulation = _b.encapsulation, template = _b.template, templateUrl = _b.templateUrl, styles = _b.styles, styleUrls = _b.styleUrls, externalStylesheets = _b.externalStylesheets, animations = _b.animations, ngContentSelectors = _b.ngContentSelectors, interpolation = _b.interpolation;
- this.encapsulation = encapsulation;
- this.template = template;
- this.templateUrl = templateUrl;
- this.styles = _normalizeArray(styles);
- this.styleUrls = _normalizeArray(styleUrls);
- this.externalStylesheets = _normalizeArray(externalStylesheets);
- this.animations = animations ? __WEBPACK_IMPORTED_MODULE_2__facade_collection__["b" /* ListWrapper */].flatten(animations) : [];
- this.ngContentSelectors = ngContentSelectors || [];
- if (interpolation && interpolation.length != 2) {
- throw new Error("'interpolation' should have a start and an end symbol.");
- }
- this.interpolation = interpolation;
- }
- /**
- * @return {?}
- */
- CompileTemplateMetadata.prototype.toSummary = function () {
- return {
- animations: this.animations.map(function (anim) { return anim.name; }),
- ngContentSelectors: this.ngContentSelectors,
- encapsulation: this.encapsulation
- };
- };
- return CompileTemplateMetadata;
-}());
-function CompileTemplateMetadata_tsickle_Closure_declarations() {
- /** @type {?} */
- CompileTemplateMetadata.prototype.encapsulation;
- /** @type {?} */
- CompileTemplateMetadata.prototype.template;
- /** @type {?} */
- CompileTemplateMetadata.prototype.templateUrl;
- /** @type {?} */
- CompileTemplateMetadata.prototype.styles;
- /** @type {?} */
- CompileTemplateMetadata.prototype.styleUrls;
- /** @type {?} */
- CompileTemplateMetadata.prototype.externalStylesheets;
- /** @type {?} */
- CompileTemplateMetadata.prototype.animations;
- /** @type {?} */
- CompileTemplateMetadata.prototype.ngContentSelectors;
- /** @type {?} */
- CompileTemplateMetadata.prototype.interpolation;
-}
-/**
- * Metadata regarding compilation of a directive.
- */
-var CompileDirectiveMetadata = (function () {
- /**
- * @param {?=} __0
- */
- function CompileDirectiveMetadata(_a) {
- var _b = _a === void 0 ? {} : _a, isHost = _b.isHost, type = _b.type, isComponent = _b.isComponent, selector = _b.selector, exportAs = _b.exportAs, changeDetection = _b.changeDetection, inputs = _b.inputs, outputs = _b.outputs, hostListeners = _b.hostListeners, hostProperties = _b.hostProperties, hostAttributes = _b.hostAttributes, providers = _b.providers, viewProviders = _b.viewProviders, queries = _b.queries, viewQueries = _b.viewQueries, entryComponents = _b.entryComponents, template = _b.template;
- this.isHost = !!isHost;
- this.type = type;
- this.isComponent = isComponent;
- this.selector = selector;
- this.exportAs = exportAs;
- this.changeDetection = changeDetection;
- this.inputs = inputs;
- this.outputs = outputs;
- this.hostListeners = hostListeners;
- this.hostProperties = hostProperties;
- this.hostAttributes = hostAttributes;
- this.providers = _normalizeArray(providers);
- this.viewProviders = _normalizeArray(viewProviders);
- this.queries = _normalizeArray(queries);
- this.viewQueries = _normalizeArray(viewQueries);
- this.entryComponents = _normalizeArray(entryComponents);
- this.template = template;
- }
- /**
- * @param {?=} __0
- * @return {?}
- */
- CompileDirectiveMetadata.create = function (_a) {
- var _b = _a === void 0 ? {} : _a, isHost = _b.isHost, type = _b.type, isComponent = _b.isComponent, selector = _b.selector, exportAs = _b.exportAs, changeDetection = _b.changeDetection, inputs = _b.inputs, outputs = _b.outputs, host = _b.host, providers = _b.providers, viewProviders = _b.viewProviders, queries = _b.queries, viewQueries = _b.viewQueries, entryComponents = _b.entryComponents, template = _b.template;
- var /** @type {?} */ hostListeners = {};
- var /** @type {?} */ hostProperties = {};
- var /** @type {?} */ hostAttributes = {};
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__facade_lang__["c" /* isPresent */])(host)) {
- Object.keys(host).forEach(function (key) {
- var /** @type {?} */ value = host[key];
- var /** @type {?} */ matches = key.match(HOST_REG_EXP);
- if (matches === null) {
- hostAttributes[key] = value;
- }
- else if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__facade_lang__["c" /* isPresent */])(matches[1])) {
- hostProperties[matches[1]] = value;
- }
- else if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__facade_lang__["c" /* isPresent */])(matches[2])) {
- hostListeners[matches[2]] = value;
+ validationManager.resetElement(element);
}
- });
- }
- var /** @type {?} */ inputsMap = {};
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__facade_lang__["c" /* isPresent */])(inputs)) {
- inputs.forEach(function (bindConfig) {
- // canonical syntax: `dirProp: elProp`
- // if there is no `:`, use dirProp = elProp
- var /** @type {?} */ parts = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["a" /* splitAtColon */])(bindConfig, [bindConfig, bindConfig]);
- inputsMap[parts[0]] = parts[1];
- });
- }
- var /** @type {?} */ outputsMap = {};
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__facade_lang__["c" /* isPresent */])(outputs)) {
- outputs.forEach(function (bindConfig) {
- // canonical syntax: `dirProp: elProp`
- // if there is no `:`, use dirProp = elProp
- var /** @type {?} */ parts = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["a" /* splitAtColon */])(bindConfig, [bindConfig, bindConfig]);
- outputsMap[parts[0]] = parts[1];
- });
- }
- return new CompileDirectiveMetadata({
- isHost: isHost,
- type: type,
- isComponent: !!isComponent, selector: selector, exportAs: exportAs, changeDetection: changeDetection,
- inputs: inputsMap,
- outputs: outputsMap,
- hostListeners: hostListeners,
- hostProperties: hostProperties,
- hostAttributes: hostAttributes,
- providers: providers,
- viewProviders: viewProviders,
- queries: queries,
- viewQueries: viewQueries,
- entryComponents: entryComponents,
- template: template,
- });
- };
- /**
- * @return {?}
- */
- CompileDirectiveMetadata.prototype.toSummary = function () {
- return {
- summaryKind: CompileSummaryKind.Directive,
- type: this.type,
- isComponent: this.isComponent,
- selector: this.selector,
- exportAs: this.exportAs,
- inputs: this.inputs,
- outputs: this.outputs,
- hostListeners: this.hostListeners,
- hostProperties: this.hostProperties,
- hostAttributes: this.hostAttributes,
- providers: this.providers,
- viewProviders: this.viewProviders,
- queries: this.queries,
- entryComponents: this.entryComponents,
- changeDetection: this.changeDetection,
- template: this.template && this.template.toSummary()
- };
- };
- return CompileDirectiveMetadata;
-}());
-function CompileDirectiveMetadata_tsickle_Closure_declarations() {
- /** @type {?} */
- CompileDirectiveMetadata.prototype.isHost;
- /** @type {?} */
- CompileDirectiveMetadata.prototype.type;
- /** @type {?} */
- CompileDirectiveMetadata.prototype.isComponent;
- /** @type {?} */
- CompileDirectiveMetadata.prototype.selector;
- /** @type {?} */
- CompileDirectiveMetadata.prototype.exportAs;
- /** @type {?} */
- CompileDirectiveMetadata.prototype.changeDetection;
- /** @type {?} */
- CompileDirectiveMetadata.prototype.inputs;
- /** @type {?} */
- CompileDirectiveMetadata.prototype.outputs;
- /** @type {?} */
- CompileDirectiveMetadata.prototype.hostListeners;
- /** @type {?} */
- CompileDirectiveMetadata.prototype.hostProperties;
- /** @type {?} */
- CompileDirectiveMetadata.prototype.hostAttributes;
- /** @type {?} */
- CompileDirectiveMetadata.prototype.providers;
- /** @type {?} */
- CompileDirectiveMetadata.prototype.viewProviders;
- /** @type {?} */
- CompileDirectiveMetadata.prototype.queries;
- /** @type {?} */
- CompileDirectiveMetadata.prototype.viewQueries;
- /** @type {?} */
- CompileDirectiveMetadata.prototype.entryComponents;
- /** @type {?} */
- CompileDirectiveMetadata.prototype.template;
-}
-/**
- * Construct {\@link CompileDirectiveMetadata} from {\@link ComponentTypeMetadata} and a selector.
- * @param {?} typeReference
- * @param {?} compMeta
- * @return {?}
- */
-function createHostComponentMeta(typeReference, compMeta) {
- var /** @type {?} */ template = __WEBPACK_IMPORTED_MODULE_5__selector__["a" /* CssSelector */].parse(compMeta.selector)[0].getMatchingElementTemplate();
- return CompileDirectiveMetadata.create({
- isHost: true,
- type: { reference: typeReference, diDeps: [], lifecycleHooks: [] },
- template: new CompileTemplateMetadata({
- encapsulation: __WEBPACK_IMPORTED_MODULE_0__angular_core__["O" /* ViewEncapsulation */].None,
- template: template,
- templateUrl: '',
- styles: [],
- styleUrls: [],
- ngContentSelectors: [],
- animations: []
- }),
- changeDetection: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* ChangeDetectionStrategy */].Default,
- inputs: [],
- outputs: [],
- host: {},
- isComponent: true,
- selector: '*',
- providers: [],
- viewProviders: [],
- queries: [],
- viewQueries: []
- });
-}
-var CompilePipeMetadata = (function () {
- /**
- * @param {?=} __0
- */
- function CompilePipeMetadata(_a) {
- var _b = _a === void 0 ? {} : _a, type = _b.type, name = _b.name, pure = _b.pure;
- this.type = type;
- this.name = name;
- this.pure = !!pure;
- }
- /**
- * @return {?}
- */
- CompilePipeMetadata.prototype.toSummary = function () {
- return {
- summaryKind: CompileSummaryKind.Pipe,
- type: this.type,
- name: this.name,
- pure: this.pure
- };
- };
- return CompilePipeMetadata;
-}());
-function CompilePipeMetadata_tsickle_Closure_declarations() {
- /** @type {?} */
- CompilePipeMetadata.prototype.type;
- /** @type {?} */
- CompilePipeMetadata.prototype.name;
- /** @type {?} */
- CompilePipeMetadata.prototype.pure;
-}
-/**
- * Metadata regarding compilation of a module.
- */
-var CompileNgModuleMetadata = (function () {
- /**
- * @param {?=} __0
- */
- function CompileNgModuleMetadata(_a) {
- var _b = _a === void 0 ? {} : _a, type = _b.type, providers = _b.providers, declaredDirectives = _b.declaredDirectives, exportedDirectives = _b.exportedDirectives, declaredPipes = _b.declaredPipes, exportedPipes = _b.exportedPipes, entryComponents = _b.entryComponents, bootstrapComponents = _b.bootstrapComponents, importedModules = _b.importedModules, exportedModules = _b.exportedModules, schemas = _b.schemas, transitiveModule = _b.transitiveModule, id = _b.id;
- this.type = type;
- this.declaredDirectives = _normalizeArray(declaredDirectives);
- this.exportedDirectives = _normalizeArray(exportedDirectives);
- this.declaredPipes = _normalizeArray(declaredPipes);
- this.exportedPipes = _normalizeArray(exportedPipes);
- this.providers = _normalizeArray(providers);
- this.entryComponents = _normalizeArray(entryComponents);
- this.bootstrapComponents = _normalizeArray(bootstrapComponents);
- this.importedModules = _normalizeArray(importedModules);
- this.exportedModules = _normalizeArray(exportedModules);
- this.schemas = _normalizeArray(schemas);
- this.id = id;
- this.transitiveModule = transitiveModule;
- }
- /**
- * @return {?}
- */
- CompileNgModuleMetadata.prototype.toSummary = function () {
- return {
- summaryKind: CompileSummaryKind.NgModule,
- type: this.type,
- entryComponents: this.transitiveModule.entryComponents,
- providers: this.transitiveModule.providers,
- modules: this.transitiveModule.modules,
- exportedDirectives: this.transitiveModule.exportedDirectives,
- exportedPipes: this.transitiveModule.exportedPipes
- };
- };
- return CompileNgModuleMetadata;
-}());
-function CompileNgModuleMetadata_tsickle_Closure_declarations() {
- /** @type {?} */
- CompileNgModuleMetadata.prototype.type;
- /** @type {?} */
- CompileNgModuleMetadata.prototype.declaredDirectives;
- /** @type {?} */
- CompileNgModuleMetadata.prototype.exportedDirectives;
- /** @type {?} */
- CompileNgModuleMetadata.prototype.declaredPipes;
- /** @type {?} */
- CompileNgModuleMetadata.prototype.exportedPipes;
- /** @type {?} */
- CompileNgModuleMetadata.prototype.entryComponents;
- /** @type {?} */
- CompileNgModuleMetadata.prototype.bootstrapComponents;
- /** @type {?} */
- CompileNgModuleMetadata.prototype.providers;
- /** @type {?} */
- CompileNgModuleMetadata.prototype.importedModules;
- /** @type {?} */
- CompileNgModuleMetadata.prototype.exportedModules;
- /** @type {?} */
- CompileNgModuleMetadata.prototype.schemas;
- /** @type {?} */
- CompileNgModuleMetadata.prototype.id;
- /** @type {?} */
- CompileNgModuleMetadata.prototype.transitiveModule;
-}
-var TransitiveCompileNgModuleMetadata = (function () {
- function TransitiveCompileNgModuleMetadata() {
- this.directivesSet = new Set();
- this.directives = [];
- this.exportedDirectivesSet = new Set();
- this.exportedDirectives = [];
- this.pipesSet = new Set();
- this.pipes = [];
- this.exportedPipesSet = new Set();
- this.exportedPipes = [];
- this.modulesSet = new Set();
- this.modules = [];
- this.entryComponentsSet = new Set();
- this.entryComponents = [];
- this.providers = [];
- }
- /**
- * @param {?} provider
- * @param {?} module
- * @return {?}
- */
- TransitiveCompileNgModuleMetadata.prototype.addProvider = function (provider, module) {
- this.providers.push({ provider: provider, module: module });
- };
- /**
- * @param {?} id
- * @return {?}
- */
- TransitiveCompileNgModuleMetadata.prototype.addDirective = function (id) {
- if (!this.directivesSet.has(id.reference)) {
- this.directivesSet.add(id.reference);
- this.directives.push(id);
- }
- };
- /**
- * @param {?} id
- * @return {?}
- */
- TransitiveCompileNgModuleMetadata.prototype.addExportedDirective = function (id) {
- if (!this.exportedDirectivesSet.has(id.reference)) {
- this.exportedDirectivesSet.add(id.reference);
- this.exportedDirectives.push(id);
- }
- };
- /**
- * @param {?} id
- * @return {?}
- */
- TransitiveCompileNgModuleMetadata.prototype.addPipe = function (id) {
- if (!this.pipesSet.has(id.reference)) {
- this.pipesSet.add(id.reference);
- this.pipes.push(id);
- }
- };
- /**
- * @param {?} id
- * @return {?}
- */
- TransitiveCompileNgModuleMetadata.prototype.addExportedPipe = function (id) {
- if (!this.exportedPipesSet.has(id.reference)) {
- this.exportedPipesSet.add(id.reference);
- this.exportedPipes.push(id);
- }
- };
- /**
- * @param {?} id
- * @return {?}
- */
- TransitiveCompileNgModuleMetadata.prototype.addModule = function (id) {
- if (!this.modulesSet.has(id.reference)) {
- this.modulesSet.add(id.reference);
- this.modules.push(id);
- }
- };
- /**
- * @param {?} id
- * @return {?}
- */
- TransitiveCompileNgModuleMetadata.prototype.addEntryComponent = function (id) {
- if (!this.entryComponentsSet.has(id.reference)) {
- this.entryComponentsSet.add(id.reference);
- this.entryComponents.push(id);
- }
- };
- return TransitiveCompileNgModuleMetadata;
-}());
-function TransitiveCompileNgModuleMetadata_tsickle_Closure_declarations() {
- /** @type {?} */
- TransitiveCompileNgModuleMetadata.prototype.directivesSet;
- /** @type {?} */
- TransitiveCompileNgModuleMetadata.prototype.directives;
- /** @type {?} */
- TransitiveCompileNgModuleMetadata.prototype.exportedDirectivesSet;
- /** @type {?} */
- TransitiveCompileNgModuleMetadata.prototype.exportedDirectives;
- /** @type {?} */
- TransitiveCompileNgModuleMetadata.prototype.pipesSet;
- /** @type {?} */
- TransitiveCompileNgModuleMetadata.prototype.pipes;
- /** @type {?} */
- TransitiveCompileNgModuleMetadata.prototype.exportedPipesSet;
- /** @type {?} */
- TransitiveCompileNgModuleMetadata.prototype.exportedPipes;
- /** @type {?} */
- TransitiveCompileNgModuleMetadata.prototype.modulesSet;
- /** @type {?} */
- TransitiveCompileNgModuleMetadata.prototype.modules;
- /** @type {?} */
- TransitiveCompileNgModuleMetadata.prototype.entryComponentsSet;
- /** @type {?} */
- TransitiveCompileNgModuleMetadata.prototype.entryComponents;
- /** @type {?} */
- TransitiveCompileNgModuleMetadata.prototype.providers;
-}
-/**
- * @param {?} obj
- * @return {?}
- */
-function _normalizeArray(obj) {
- return obj || [];
-}
-var ProviderMeta = (function () {
- /**
- * @param {?} token
- * @param {?} __1
- */
- function ProviderMeta(token, _a) {
- var useClass = _a.useClass, useValue = _a.useValue, useExisting = _a.useExisting, useFactory = _a.useFactory, deps = _a.deps, multi = _a.multi;
- this.token = token;
- this.useClass = useClass;
- this.useValue = useValue;
- this.useExisting = useExisting;
- this.useFactory = useFactory;
- this.dependencies = deps;
- this.multi = !!multi;
- }
- return ProviderMeta;
-}());
-function ProviderMeta_tsickle_Closure_declarations() {
- /** @type {?} */
- ProviderMeta.prototype.token;
- /** @type {?} */
- ProviderMeta.prototype.useClass;
- /** @type {?} */
- ProviderMeta.prototype.useValue;
- /** @type {?} */
- ProviderMeta.prototype.useExisting;
- /** @type {?} */
- ProviderMeta.prototype.useFactory;
- /** @type {?} */
- ProviderMeta.prototype.dependencies;
- /** @type {?} */
- ProviderMeta.prototype.multi;
-}
-//# sourceMappingURL=compile_metadata.js.map
+ };
-/***/ }),
-/* 16 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (frmCtrl) {
+ frmCtrl.setExternalValidation = function (modelProperty, errorMsgKey, errorMessageOverride, addToModelErrors) {
+ var success = false;
+ if (frmCtrl[modelProperty]) {
+ frmCtrl[modelProperty].setExternalValidation(errorMsgKey, errorMessageOverride, addToModelErrors);
+ success = true;
+ }
-"use strict";
-/**
- * Higher order functions
- *
- * These utility functions are exported, but are subject to change without notice.
- *
- * @module common_hof
- */ /** */
+ return success;
+ };
-/**
- * Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function.
- *
- * Given a function with N parameters, returns a new function that supports partial application.
- * The new function accepts anywhere from 1 to N parameters. When that function is called with M parameters,
- * where M is less than N, it returns a new function that accepts the remaining parameters. It continues to
- * accept more parameters until all N parameters have been supplied.
- *
- *
- * This contrived example uses a partially applied function as an predicate, which returns true
- * if an object is found in both arrays.
- * @example
- * ```
- * // returns true if an object is in both of the two arrays
- * function inBoth(array1, array2, object) {
- * return array1.indexOf(object) !== -1 &&
- * array2.indexOf(object) !== 1;
- * }
- * let obj1, obj2, obj3, obj4, obj5, obj6, obj7
- * let foos = [obj1, obj3]
- * let bars = [obj3, obj4, obj5]
- *
- * // A curried "copy" of inBoth
- * let curriedInBoth = curry(inBoth);
- * // Partially apply both the array1 and array2
- * let inFoosAndBars = curriedInBoth(foos, bars);
- *
- * // Supply the final argument; since all arguments are
- * // supplied, the original inBoth function is then called.
- * let obj1InBoth = inFoosAndBars(obj1); // false
- *
- * // Use the inFoosAndBars as a predicate.
- * // Filter, on each iteration, supplies the final argument
- * let allObjs = [ obj1, obj2, obj3, obj4, obj5, obj6, obj7 ];
- * let foundInBoth = allObjs.filter(inFoosAndBars); // [ obj3 ]
- *
- * ```
- *
- * Stolen from: http://stackoverflow.com/questions/4394747/javascript-curry-function
- *
- * @param fn
- * @returns {*|function(): (*|any)}
- */
-function curry(fn) {
- var initial_args = [].slice.apply(arguments, [1]);
- var func_args_length = fn.length;
- function curried(args) {
- if (args.length >= func_args_length)
- return fn.apply(null, args);
- return function () {
- return curried(args.concat([].slice.apply(arguments)));
+ frmCtrl.removeExternalValidation = function (modelProperty, errorMsgKey, errorMessageOverride, addToModelErrors) {
+ var success = false;
+ if (frmCtrl[modelProperty]) {
+ frmCtrl[modelProperty].removeExternalValidation(errorMsgKey, addToModelErrors);
+ success = true;
+ }
+
+ return success;
+ };
+ }
+
+ return originalLink.pre ?
+ originalLink.pre.apply(this, arguments) :
+ this;
+ },
+ post: function (scope, element, attrs, ctrls) {
+ return originalLink.post ?
+ originalLink.post.apply(this, arguments) :
+ originalLink.apply(this, arguments);
+ }
+ };
};
- }
- return curried(initial_args);
-}
-exports.curry = curry;
-/**
- * Given a varargs list of functions, returns a function that composes the argument functions, right-to-left
- * given: f(x), g(x), h(x)
- * let composed = compose(f,g,h)
- * then, composed is: f(g(h(x)))
- */
-function compose() {
- var args = arguments;
- var start = args.length - 1;
- return function () {
- var i = start, result = args[start].apply(this, arguments);
- while (i--)
- result = args[i].call(this, result);
- return result;
- };
-}
-exports.compose = compose;
-/**
- * Given a varargs list of functions, returns a function that is composes the argument functions, left-to-right
- * given: f(x), g(x), h(x)
- * let piped = pipe(f,g,h);
- * then, piped is: h(g(f(x)))
- */
-function pipe() {
- var funcs = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- funcs[_i] = arguments[_i];
- }
- return compose.apply(null, [].slice.call(arguments).reverse());
-}
-exports.pipe = pipe;
-/**
- * Given a property name, returns a function that returns that property from an object
- * let obj = { foo: 1, name: "blarg" };
- * let getName = prop("name");
- * getName(obj) === "blarg"
- */
-exports.prop = function (name) {
- return function (obj) { return obj && obj[name]; };
-};
-/**
- * Given a property name and a value, returns a function that returns a boolean based on whether
- * the passed object has a property that matches the value
- * let obj = { foo: 1, name: "blarg" };
- * let getName = propEq("name", "blarg");
- * getName(obj) === true
- */
-exports.propEq = curry(function (name, val, obj) { return obj && obj[name] === val; });
-/**
- * Given a dotted property name, returns a function that returns a nested property from an object, or undefined
- * let obj = { id: 1, nestedObj: { foo: 1, name: "blarg" }, };
- * let getName = prop("nestedObj.name");
- * getName(obj) === "blarg"
- * let propNotFound = prop("this.property.doesnt.exist");
- * propNotFound(obj) === undefined
- */
-exports.parse = function (name) {
- return pipe.apply(null, name.split(".").map(exports.prop));
-};
-/**
- * Given a function that returns a truthy or falsey value, returns a
- * function that returns the opposite (falsey or truthy) value given the same inputs
- */
-exports.not = function (fn) {
- return function () {
- var args = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- args[_i] = arguments[_i];
- }
- return !fn.apply(null, args);
- };
-};
-/**
- * Given two functions that return truthy or falsey values, returns a function that returns truthy
- * if both functions return truthy for the given arguments
- */
-function and(fn1, fn2) {
- return function () {
- var args = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- args[_i] = arguments[_i];
- }
- return fn1.apply(null, args) && fn2.apply(null, args);
- };
-}
-exports.and = and;
-/**
- * Given two functions that return truthy or falsey values, returns a function that returns truthy
- * if at least one of the functions returns truthy for the given arguments
- */
-function or(fn1, fn2) {
- return function () {
- var args = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- args[_i] = arguments[_i];
- }
- return fn1.apply(null, args) || fn2.apply(null, args);
- };
-}
-exports.or = or;
-/**
- * Check if all the elements of an array match a predicate function
- *
- * @param fn1 a predicate function `fn1`
- * @returns a function which takes an array and returns true if `fn1` is true for all elements of the array
- */
-exports.all = function (fn1) {
- return function (arr) { return arr.reduce(function (b, x) { return b && !!fn1(x); }, true); };
-};
-exports.any = function (fn1) {
- return function (arr) { return arr.reduce(function (b, x) { return b || !!fn1(x); }, false); };
-};
-/** Given a class, returns a Predicate function that returns true if the object is of that class */
-exports.is = function (ctor) {
- return function (obj) {
- return (obj != null && obj.constructor === ctor || obj instanceof ctor);
- };
-};
-/** Given a value, returns a Predicate function that returns true if another value is === equal to the original value */
-exports.eq = function (val) { return function (other) {
- return val === other;
-}; };
-/** Given a value, returns a function which returns the value */
-exports.val = function (v) { return function () { return v; }; };
-function invoke(fnName, args) {
- return function (obj) {
- return obj[fnName].apply(obj, args);
- };
-}
-exports.invoke = invoke;
-/**
- * Sorta like Pattern Matching (a functional programming conditional construct)
- *
- * See http://c2.com/cgi/wiki?PatternMatching
- *
- * This is a conditional construct which allows a series of predicates and output functions
- * to be checked and then applied. Each predicate receives the input. If the predicate
- * returns truthy, then its matching output function (mapping function) is provided with
- * the input and, then the result is returned.
- *
- * Each combination (2-tuple) of predicate + output function should be placed in an array
- * of size 2: [ predicate, mapFn ]
- *
- * These 2-tuples should be put in an outer array.
- *
- * @example
- * ```
- *
- * // Here's a 2-tuple where the first element is the isString predicate
- * // and the second element is a function that returns a description of the input
- * let firstTuple = [ angular.isString, (input) => `Heres your string ${input}` ];
- *
- * // Second tuple: predicate "isNumber", mapfn returns a description
- * let secondTuple = [ angular.isNumber, (input) => `(${input}) That's a number!` ];
- *
- * let third = [ (input) => input === null, (input) => `Oh, null...` ];
- *
- * let fourth = [ (input) => input === undefined, (input) => `notdefined` ];
- *
- * let descriptionOf = pattern([ firstTuple, secondTuple, third, fourth ]);
- *
- * console.log(descriptionOf(undefined)); // 'notdefined'
- * console.log(descriptionOf(55)); // '(55) That's a number!'
- * console.log(descriptionOf("foo")); // 'Here's your string foo'
- * ```
- *
- * @param struct A 2D array. Each element of the array should be an array, a 2-tuple,
- * with a Predicate and a mapping/output function
- * @returns {function(any): *}
- */
-function pattern(struct) {
- return function (x) {
- for (var i = 0; i < struct.length; i++) {
- if (struct[i][0](x))
- return struct[i][1](x);
- }
- };
+
+ return $delegate;
+ }
+ ]);
+ }
+]);
+
+function AutoValidateRunFn(validator, defaultErrorMessageResolver, bootstrap3ElementModifier, foundation5ElementModifier) {
+ validator.setErrorMessageResolver(defaultErrorMessageResolver.resolve);
+ validator.registerDomModifier(bootstrap3ElementModifier.key, bootstrap3ElementModifier);
+ validator.registerDomModifier(foundation5ElementModifier.key, foundation5ElementModifier);
+ validator.setDefaultElementModifier(bootstrap3ElementModifier.key);
}
-exports.pattern = pattern;
-//# sourceMappingURL=hof.js.map
-/***/ }),
-/* 17 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+AutoValidateRunFn.$inject = [
+ 'validator',
+ 'defaultErrorMessageResolver',
+ 'bootstrap3ElementModifier',
+ 'foundation5ElementModifier'
+];
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return isDefaultChangeDetectionStrategy; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return ChangeDetectorStatus; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return LifecycleHooks; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return LIFECYCLE_HOOKS_VALUES; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return ReflectorReader; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return ViewContainer; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return CodegenComponentFactoryResolver; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return ComponentRef_; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return AppView; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return DebugAppView; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return NgModuleInjector; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return registerModuleFactory; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return ViewType; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return view_utils; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return DebugContext; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return StaticNodeDebugInfo; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return devModeEqual; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return UNINITIALIZED; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return ValueUnwrapper; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return TemplateRef_; });
-/* unused harmony export RenderDebugInfo */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return Console; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return reflector; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return Reflector; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return ReflectionCapabilities; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return NoOpAnimationPlayer; });
-/* unused harmony export AnimationPlayer */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return AnimationSequencePlayer; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return AnimationGroupPlayer; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return AnimationKeyframe; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return AnimationStyles; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ANY_STATE; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return DEFAULT_STATE; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return EMPTY_STATE; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return FILL_STYLE_FLAG; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return prepareFinalAnimationStyles; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return balanceAnimationKeyframes; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return clearStyles; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return collectAndResolveStyles; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return renderStyles; });
-/* unused harmony export ViewMetadata */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return ComponentStillLoadingError; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return AnimationTransition; });
-/**
- * @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
- */
+angular.module('jcs-autoValidate').run(AutoValidateRunFn);
+
+}(String, angular));
-var /** @type {?} */ isDefaultChangeDetectionStrategy = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].isDefaultChangeDetectionStrategy;
-var /** @type {?} */ ChangeDetectorStatus = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].ChangeDetectorStatus;
-var /** @type {?} */ LifecycleHooks = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].LifecycleHooks;
-var /** @type {?} */ LIFECYCLE_HOOKS_VALUES = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].LIFECYCLE_HOOKS_VALUES;
-var /** @type {?} */ ReflectorReader = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].ReflectorReader;
-var /** @type {?} */ ViewContainer = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].ViewContainer;
-var /** @type {?} */ CodegenComponentFactoryResolver = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].CodegenComponentFactoryResolver;
-var /** @type {?} */ ComponentRef_ = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].ComponentRef_;
-var /** @type {?} */ AppView = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].AppView;
-var /** @type {?} */ DebugAppView = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].DebugAppView;
-var /** @type {?} */ NgModuleInjector = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].NgModuleInjector;
-var /** @type {?} */ registerModuleFactory = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].registerModuleFactory;
-var /** @type {?} */ ViewType = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].ViewType;
-var /** @type {?} */ view_utils = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].view_utils;
-var /** @type {?} */ DebugContext = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].DebugContext;
-var /** @type {?} */ StaticNodeDebugInfo = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].StaticNodeDebugInfo;
-var /** @type {?} */ devModeEqual = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].devModeEqual;
-var /** @type {?} */ UNINITIALIZED = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].UNINITIALIZED;
-var /** @type {?} */ ValueUnwrapper = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].ValueUnwrapper;
-var /** @type {?} */ TemplateRef_ = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].TemplateRef_;
-var /** @type {?} */ RenderDebugInfo = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].RenderDebugInfo;
-var /** @type {?} */ Console = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].Console;
-var /** @type {?} */ reflector = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].reflector;
-var /** @type {?} */ Reflector = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].Reflector;
-var /** @type {?} */ ReflectionCapabilities = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].ReflectionCapabilities;
-var /** @type {?} */ NoOpAnimationPlayer = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].NoOpAnimationPlayer;
-var /** @type {?} */ AnimationPlayer = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].AnimationPlayer;
-var /** @type {?} */ AnimationSequencePlayer = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].AnimationSequencePlayer;
-var /** @type {?} */ AnimationGroupPlayer = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].AnimationGroupPlayer;
-var /** @type {?} */ AnimationKeyframe = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].AnimationKeyframe;
-var /** @type {?} */ AnimationStyles = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].AnimationStyles;
-var /** @type {?} */ ANY_STATE = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].ANY_STATE;
-var /** @type {?} */ DEFAULT_STATE = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].DEFAULT_STATE;
-var /** @type {?} */ EMPTY_STATE = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].EMPTY_STATE;
-var /** @type {?} */ FILL_STYLE_FLAG = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].FILL_STYLE_FLAG;
-var /** @type {?} */ prepareFinalAnimationStyles = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].prepareFinalAnimationStyles;
-var /** @type {?} */ balanceAnimationKeyframes = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].balanceAnimationKeyframes;
-var /** @type {?} */ clearStyles = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].clearStyles;
-var /** @type {?} */ collectAndResolveStyles = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].collectAndResolveStyles;
-var /** @type {?} */ renderStyles = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].renderStyles;
-var /** @type {?} */ ViewMetadata = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].ViewMetadata;
-var /** @type {?} */ ComponentStillLoadingError = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].ComponentStillLoadingError;
-var /** @type {?} */ AnimationTransition = __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* __core_private__ */].AnimationTransition;
-//# sourceMappingURL=private_import_core.js.map
/***/ }),
-/* 18 */
+/* 3 */
/***/ (function(module, exports, __webpack_require__) {
-var store = __webpack_require__(195)('wks')
- , uid = __webpack_require__(139)
- , Symbol = __webpack_require__(22).Symbol
- , USE_SYMBOL = typeof Symbol == 'function';
+var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! angular-ladda 0.4.3 */
+/**!
+ * AngularJS Ladda directive
+ * @author Chungsub Kim
+ */
-var $exports = module.exports = function(name){
- return store[name] || (store[name] =
- USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
-};
+/* global Ladda */
+/* exported Ladda */
+(function (root, factory)
+{
+ 'use strict';
+ if (true) {
+ // AMD. Register as an anonymous module.
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0), __webpack_require__(22)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
+ (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ } else if (typeof module !== 'undefined' && typeof module.exports === 'object') {
+ // CommonJS support (for us webpack/browserify/ComponentJS folks)
+ module.exports = factory(window.angular || require('angular'), require('ladda'));
+ } else {
+ // in the case of no module loading system
+ return factory(root.angular, root.Ladda);
+ }
+}(this, function (angular, Ladda){
+ 'use strict';
-$exports.store = store;
+ var moduleName = 'angular-ladda';
+
+ angular.module(moduleName, [])
+ .provider('ladda', function () {
+ var opts = {
+ 'style': 'zoom-in'
+ };
+ return {
+ setOption: function (newOpts) {
+ angular.extend(opts, newOpts);
+ },
+ $get: function () {
+ return opts;
+ }
+ };
+ })
+ .directive('ladda', ['ladda', '$timeout', function (laddaOption, $timeout) {
+ return {
+ restrict: 'A',
+ priority: -1,
+ link: function (scope, element, attrs) {
+ $timeout(function() {
+ element.addClass('ladda-button');
+ if(angular.isUndefined(element.attr('data-style'))) {
+ element.attr('data-style', laddaOption.style || 'zoom-in');
+ }
+ if(angular.isUndefined(element.attr('data-spinner-size')) && laddaOption.spinnerSize) {
+ element.attr('data-spinner-size', laddaOption.spinnerSize);
+ }
+ if(angular.isUndefined(element.attr('data-spinner-color')) && laddaOption.spinnerColor) {
+ element.attr('data-spinner-color', laddaOption.spinnerColor);
+ }
-/***/ }),
-/* 19 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ // ladda breaks childNode's event property.
+ // because ladda use innerHTML instead of append node
+ if(!element[0].querySelector('.ladda-label')) {
+ var labelWrapper = document.createElement('span');
+ labelWrapper.className = 'ladda-label';
+ angular.element(labelWrapper).append(element.contents());
+ element.append(labelWrapper);
+ }
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__private_import_core__ = __webpack_require__(17);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Identifiers; });
-/* unused harmony export assetUrl */
-/* harmony export (immutable) */ __webpack_exports__["e"] = resolveIdentifier;
-/* harmony export (immutable) */ __webpack_exports__["a"] = createIdentifier;
-/* harmony export (immutable) */ __webpack_exports__["c"] = identifierToken;
-/* harmony export (immutable) */ __webpack_exports__["f"] = createIdentifierToken;
-/* harmony export (immutable) */ __webpack_exports__["d"] = createEnumIdentifier;
-/**
- * @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
- */
+ // create ladda button
+ var ladda = Ladda.create( element[0] );
+ // add watch!
+ scope.$watch(attrs.ladda, function(loading) {
+ if(!loading && !angular.isNumber(loading)) {
+ ladda.stop();
+ // When the button also have the ng-disabled directive it needs to be
+ // re-evaluated since the disabled attribute is removed by the 'stop' method.
+ if (attrs.ngDisabled) {
+ element.attr('disabled', scope.$eval(attrs.ngDisabled));
+ }
+ return;
+ }
+ if(!ladda.isLoading()) {
+ ladda.start();
+ }
+ if(angular.isNumber(loading)) {
+ ladda.setProgress(loading);
+ }
+ });
+
+ // use remove on scope destroy to stop memory leaks
+ scope.$on('$destroy', function () {
+ if (ladda) { // prevent null reference
+ ladda.remove();
+ }
+ });
+ });
+ }
+ };
+ }]);
+
+ return moduleName;
+}));
-var /** @type {?} */ APP_VIEW_MODULE_URL = assetUrl('core', 'linker/view');
-var /** @type {?} */ VIEW_UTILS_MODULE_URL = assetUrl('core', 'linker/view_utils');
-var /** @type {?} */ CD_MODULE_URL = assetUrl('core', 'change_detection/change_detection');
-var /** @type {?} */ 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: __WEBPACK_IMPORTED_MODULE_0__angular_core__["R" /* ANALYZE_FOR_ENTRY_COMPONENTS */]
- };
- Identifiers.ViewUtils = {
- name: 'ViewUtils',
- moduleUrl: assetUrl('core', 'linker/view_utils'),
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].ViewUtils
- };
- Identifiers.AppView = { name: 'AppView', moduleUrl: APP_VIEW_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["e" /* AppView */] };
- Identifiers.DebugAppView = {
- name: 'DebugAppView',
- moduleUrl: APP_VIEW_MODULE_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["f" /* DebugAppView */]
- };
- Identifiers.ViewContainer = {
- name: 'ViewContainer',
- moduleUrl: assetUrl('core', 'linker/view_container'),
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["g" /* ViewContainer */]
- };
- Identifiers.ElementRef = {
- name: 'ElementRef',
- moduleUrl: assetUrl('core', 'linker/element_ref'),
- runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["C" /* ElementRef */]
- };
- Identifiers.ViewContainerRef = {
- name: 'ViewContainerRef',
- moduleUrl: assetUrl('core', 'linker/view_container_ref'),
- runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["z" /* ViewContainerRef */]
- };
- Identifiers.ChangeDetectorRef = {
- name: 'ChangeDetectorRef',
- moduleUrl: assetUrl('core', 'change_detection/change_detector_ref'),
- runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["t" /* ChangeDetectorRef */]
- };
- Identifiers.RenderComponentType = {
- name: 'RenderComponentType',
- moduleUrl: assetUrl('core', 'render/api'),
- runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["S" /* RenderComponentType */]
- };
- Identifiers.QueryList = {
- name: 'QueryList',
- moduleUrl: assetUrl('core', 'linker/query_list'),
- runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["T" /* QueryList */]
- };
- Identifiers.TemplateRef = {
- name: 'TemplateRef',
- moduleUrl: assetUrl('core', 'linker/template_ref'),
- runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["y" /* TemplateRef */]
- };
- Identifiers.TemplateRef_ = {
- name: 'TemplateRef_',
- moduleUrl: assetUrl('core', 'linker/template_ref'),
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["h" /* TemplateRef_ */]
- };
- Identifiers.CodegenComponentFactoryResolver = {
- name: 'CodegenComponentFactoryResolver',
- moduleUrl: assetUrl('core', 'linker/component_factory_resolver'),
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["i" /* CodegenComponentFactoryResolver */]
- };
- Identifiers.ComponentFactoryResolver = {
- name: 'ComponentFactoryResolver',
- moduleUrl: assetUrl('core', 'linker/component_factory_resolver'),
- runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["U" /* ComponentFactoryResolver */]
- };
- Identifiers.ComponentFactory = {
- name: 'ComponentFactory',
- runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["V" /* ComponentFactory */],
- moduleUrl: assetUrl('core', 'linker/component_factory')
- };
- Identifiers.ComponentRef_ = {
- name: 'ComponentRef_',
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["j" /* ComponentRef_ */],
- moduleUrl: assetUrl('core', 'linker/component_factory')
- };
- Identifiers.ComponentRef = {
- name: 'ComponentRef',
- runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["W" /* ComponentRef */],
- moduleUrl: assetUrl('core', 'linker/component_factory')
- };
- Identifiers.NgModuleFactory = {
- name: 'NgModuleFactory',
- runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["X" /* NgModuleFactory */],
- moduleUrl: assetUrl('core', 'linker/ng_module_factory')
- };
- Identifiers.NgModuleInjector = {
- name: 'NgModuleInjector',
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["k" /* NgModuleInjector */],
- moduleUrl: assetUrl('core', 'linker/ng_module_factory')
- };
- Identifiers.RegisterModuleFactoryFn = {
- name: 'registerModuleFactory',
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["l" /* registerModuleFactory */],
- moduleUrl: assetUrl('core', 'linker/ng_module_factory_loader')
- };
- Identifiers.ValueUnwrapper = { name: 'ValueUnwrapper', moduleUrl: CD_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["m" /* ValueUnwrapper */] };
- Identifiers.Injector = {
- name: 'Injector',
- moduleUrl: assetUrl('core', 'di/injector'),
- runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Y" /* Injector */]
- };
- Identifiers.ViewEncapsulation = {
- name: 'ViewEncapsulation',
- moduleUrl: assetUrl('core', 'metadata/view'),
- runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["O" /* ViewEncapsulation */]
- };
- Identifiers.ViewType = {
- name: 'ViewType',
- moduleUrl: assetUrl('core', 'linker/view_type'),
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["n" /* ViewType */]
- };
- Identifiers.ChangeDetectionStrategy = {
- name: 'ChangeDetectionStrategy',
- moduleUrl: CD_MODULE_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* ChangeDetectionStrategy */]
- };
- Identifiers.StaticNodeDebugInfo = {
- name: 'StaticNodeDebugInfo',
- moduleUrl: assetUrl('core', 'linker/debug_context'),
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["o" /* StaticNodeDebugInfo */]
- };
- Identifiers.DebugContext = {
- name: 'DebugContext',
- moduleUrl: assetUrl('core', 'linker/debug_context'),
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["p" /* DebugContext */]
- };
- Identifiers.Renderer = {
- name: 'Renderer',
- moduleUrl: assetUrl('core', 'render/api'),
- runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["D" /* Renderer */]
- };
- Identifiers.SimpleChange = { name: 'SimpleChange', moduleUrl: CD_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Z" /* SimpleChange */] };
- Identifiers.UNINITIALIZED = { name: 'UNINITIALIZED', moduleUrl: CD_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["q" /* UNINITIALIZED */] };
- Identifiers.ChangeDetectorStatus = {
- name: 'ChangeDetectorStatus',
- moduleUrl: CD_MODULE_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["r" /* ChangeDetectorStatus */]
- };
- Identifiers.checkBinding = {
- name: 'checkBinding',
- moduleUrl: VIEW_UTILS_MODULE_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].checkBinding
- };
- Identifiers.devModeEqual = { name: 'devModeEqual', moduleUrl: CD_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["s" /* devModeEqual */] };
- Identifiers.inlineInterpolate = {
- name: 'inlineInterpolate',
- moduleUrl: VIEW_UTILS_MODULE_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].inlineInterpolate
- };
- Identifiers.interpolate = {
- name: 'interpolate',
- moduleUrl: VIEW_UTILS_MODULE_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].interpolate
- };
- Identifiers.castByValue = {
- name: 'castByValue',
- moduleUrl: VIEW_UTILS_MODULE_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].castByValue
- };
- Identifiers.EMPTY_ARRAY = {
- name: 'EMPTY_ARRAY',
- moduleUrl: VIEW_UTILS_MODULE_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].EMPTY_ARRAY
- };
- Identifiers.EMPTY_MAP = {
- name: 'EMPTY_MAP',
- moduleUrl: VIEW_UTILS_MODULE_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].EMPTY_MAP
- };
- Identifiers.createRenderElement = {
- name: 'createRenderElement',
- moduleUrl: VIEW_UTILS_MODULE_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].createRenderElement
- };
- Identifiers.selectOrCreateRenderHostElement = {
- name: 'selectOrCreateRenderHostElement',
- moduleUrl: VIEW_UTILS_MODULE_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].selectOrCreateRenderHostElement
- };
- Identifiers.pureProxies = [
- null,
- { name: 'pureProxy1', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].pureProxy1 },
- { name: 'pureProxy2', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].pureProxy2 },
- { name: 'pureProxy3', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].pureProxy3 },
- { name: 'pureProxy4', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].pureProxy4 },
- { name: 'pureProxy5', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].pureProxy5 },
- { name: 'pureProxy6', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].pureProxy6 },
- { name: 'pureProxy7', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].pureProxy7 },
- { name: 'pureProxy8', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].pureProxy8 },
- { name: 'pureProxy9', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].pureProxy9 },
- { name: 'pureProxy10', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].pureProxy10 },
- ];
- Identifiers.SecurityContext = {
- name: 'SecurityContext',
- moduleUrl: assetUrl('core', 'security'),
- runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* SecurityContext */],
- };
- Identifiers.AnimationKeyframe = {
- name: 'AnimationKeyframe',
- moduleUrl: assetUrl('core', 'animation/animation_keyframe'),
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["t" /* AnimationKeyframe */]
- };
- Identifiers.AnimationStyles = {
- name: 'AnimationStyles',
- moduleUrl: assetUrl('core', 'animation/animation_styles'),
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["u" /* AnimationStyles */]
- };
- Identifiers.NoOpAnimationPlayer = {
- name: 'NoOpAnimationPlayer',
- moduleUrl: assetUrl('core', 'animation/animation_player'),
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["v" /* NoOpAnimationPlayer */]
- };
- Identifiers.AnimationGroupPlayer = {
- name: 'AnimationGroupPlayer',
- moduleUrl: assetUrl('core', 'animation/animation_group_player'),
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["w" /* AnimationGroupPlayer */]
- };
- Identifiers.AnimationSequencePlayer = {
- name: 'AnimationSequencePlayer',
- moduleUrl: assetUrl('core', 'animation/animation_sequence_player'),
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["x" /* AnimationSequencePlayer */]
- };
- Identifiers.prepareFinalAnimationStyles = {
- name: 'prepareFinalAnimationStyles',
- moduleUrl: ANIMATION_STYLE_UTIL_ASSET_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["y" /* prepareFinalAnimationStyles */]
- };
- Identifiers.balanceAnimationKeyframes = {
- name: 'balanceAnimationKeyframes',
- moduleUrl: ANIMATION_STYLE_UTIL_ASSET_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["z" /* balanceAnimationKeyframes */]
- };
- Identifiers.clearStyles = {
- name: 'clearStyles',
- moduleUrl: ANIMATION_STYLE_UTIL_ASSET_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["A" /* clearStyles */]
- };
- Identifiers.renderStyles = {
- name: 'renderStyles',
- moduleUrl: ANIMATION_STYLE_UTIL_ASSET_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["B" /* renderStyles */]
- };
- Identifiers.collectAndResolveStyles = {
- name: 'collectAndResolveStyles',
- moduleUrl: ANIMATION_STYLE_UTIL_ASSET_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["C" /* collectAndResolveStyles */]
- };
- Identifiers.LOCALE_ID = {
- name: 'LOCALE_ID',
- moduleUrl: assetUrl('core', 'i18n/tokens'),
- runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["r" /* LOCALE_ID */]
- };
- Identifiers.TRANSLATIONS_FORMAT = {
- name: 'TRANSLATIONS_FORMAT',
- moduleUrl: assetUrl('core', 'i18n/tokens'),
- runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_0" /* TRANSLATIONS_FORMAT */]
- };
- Identifiers.setBindingDebugInfo = {
- name: 'setBindingDebugInfo',
- moduleUrl: VIEW_UTILS_MODULE_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].setBindingDebugInfo
- };
- Identifiers.setBindingDebugInfoForChanges = {
- name: 'setBindingDebugInfoForChanges',
- moduleUrl: VIEW_UTILS_MODULE_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].setBindingDebugInfoForChanges
- };
- Identifiers.AnimationTransition = {
- name: 'AnimationTransition',
- moduleUrl: assetUrl('core', 'animation/animation_transition'),
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["D" /* 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: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].InlineArray2 },
- { name: 'InlineArray2', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].InlineArray2 },
- { name: 'InlineArray4', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].InlineArray4 },
- { name: 'InlineArray8', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].InlineArray8 },
- { name: 'InlineArray16', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].InlineArray16 },
- ];
- Identifiers.EMPTY_INLINE_ARRAY = {
- name: 'EMPTY_INLINE_ARRAY',
- moduleUrl: VIEW_UTILS_MODULE_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].EMPTY_INLINE_ARRAY
- };
- Identifiers.InlineArrayDynamic = {
- name: 'InlineArrayDynamic',
- moduleUrl: VIEW_UTILS_MODULE_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].InlineArrayDynamic
- };
- Identifiers.subscribeToRenderElement = {
- name: 'subscribeToRenderElement',
- moduleUrl: VIEW_UTILS_MODULE_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].subscribeToRenderElement
- };
- Identifiers.createRenderComponentType = {
- name: 'createRenderComponentType',
- moduleUrl: VIEW_UTILS_MODULE_URL,
- runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].createRenderComponentType
- };
- Identifiers.noop = { name: 'noop', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_1__private_import_core__["d" /* view_utils */].noop };
- return Identifiers;
-}());
-function Identifiers_tsickle_Closure_declarations() {
- /** @type {?} */
- Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS;
- /** @type {?} */
- Identifiers.ViewUtils;
- /** @type {?} */
- Identifiers.AppView;
- /** @type {?} */
- Identifiers.DebugAppView;
- /** @type {?} */
- Identifiers.ViewContainer;
- /** @type {?} */
- Identifiers.ElementRef;
- /** @type {?} */
- Identifiers.ViewContainerRef;
- /** @type {?} */
- Identifiers.ChangeDetectorRef;
- /** @type {?} */
- Identifiers.RenderComponentType;
- /** @type {?} */
- Identifiers.QueryList;
- /** @type {?} */
- Identifiers.TemplateRef;
- /** @type {?} */
- Identifiers.TemplateRef_;
- /** @type {?} */
- Identifiers.CodegenComponentFactoryResolver;
- /** @type {?} */
- Identifiers.ComponentFactoryResolver;
- /** @type {?} */
- Identifiers.ComponentFactory;
- /** @type {?} */
- Identifiers.ComponentRef_;
- /** @type {?} */
- Identifiers.ComponentRef;
- /** @type {?} */
- Identifiers.NgModuleFactory;
- /** @type {?} */
- Identifiers.NgModuleInjector;
- /** @type {?} */
- Identifiers.RegisterModuleFactoryFn;
- /** @type {?} */
- Identifiers.ValueUnwrapper;
- /** @type {?} */
- Identifiers.Injector;
- /** @type {?} */
- Identifiers.ViewEncapsulation;
- /** @type {?} */
- Identifiers.ViewType;
- /** @type {?} */
- Identifiers.ChangeDetectionStrategy;
- /** @type {?} */
- Identifiers.StaticNodeDebugInfo;
- /** @type {?} */
- Identifiers.DebugContext;
- /** @type {?} */
- Identifiers.Renderer;
- /** @type {?} */
- Identifiers.SimpleChange;
- /** @type {?} */
- Identifiers.UNINITIALIZED;
- /** @type {?} */
- Identifiers.ChangeDetectorStatus;
- /** @type {?} */
- Identifiers.checkBinding;
- /** @type {?} */
- Identifiers.devModeEqual;
- /** @type {?} */
- Identifiers.inlineInterpolate;
- /** @type {?} */
- Identifiers.interpolate;
- /** @type {?} */
- Identifiers.castByValue;
- /** @type {?} */
- Identifiers.EMPTY_ARRAY;
- /** @type {?} */
- Identifiers.EMPTY_MAP;
- /** @type {?} */
- Identifiers.createRenderElement;
- /** @type {?} */
- Identifiers.selectOrCreateRenderHostElement;
- /** @type {?} */
- Identifiers.pureProxies;
- /** @type {?} */
- Identifiers.SecurityContext;
- /** @type {?} */
- Identifiers.AnimationKeyframe;
- /** @type {?} */
- Identifiers.AnimationStyles;
- /** @type {?} */
- Identifiers.NoOpAnimationPlayer;
- /** @type {?} */
- Identifiers.AnimationGroupPlayer;
- /** @type {?} */
- Identifiers.AnimationSequencePlayer;
- /** @type {?} */
- Identifiers.prepareFinalAnimationStyles;
- /** @type {?} */
- Identifiers.balanceAnimationKeyframes;
- /** @type {?} */
- Identifiers.clearStyles;
- /** @type {?} */
- Identifiers.renderStyles;
- /** @type {?} */
- Identifiers.collectAndResolveStyles;
- /** @type {?} */
- Identifiers.LOCALE_ID;
- /** @type {?} */
- Identifiers.TRANSLATIONS_FORMAT;
- /** @type {?} */
- Identifiers.setBindingDebugInfo;
- /** @type {?} */
- Identifiers.setBindingDebugInfoForChanges;
- /** @type {?} */
- Identifiers.AnimationTransition;
- /** @type {?} */
- Identifiers.InlineArray;
- /** @type {?} */
- Identifiers.inlineArrays;
- /** @type {?} */
- Identifiers.EMPTY_INLINE_ARRAY;
- /** @type {?} */
- Identifiers.InlineArrayDynamic;
- /** @type {?} */
- Identifiers.subscribeToRenderElement;
- /** @type {?} */
- Identifiers.createRenderComponentType;
- /** @type {?} */
- Identifiers.noop;
-}
-/**
- * @param {?} pkg
- * @param {?=} path
- * @param {?=} type
- * @return {?}
- */
-function assetUrl(pkg, path, type) {
- if (path === void 0) { path = null; }
- if (type === void 0) { type = 'src'; }
- if (path == null) {
- return "@angular/" + pkg + "/index";
- }
- else {
- return "@angular/" + pkg + "/" + type + "/" + path;
- }
-}
-/**
- * @param {?} identifier
- * @return {?}
- */
-function resolveIdentifier(identifier) {
- return __WEBPACK_IMPORTED_MODULE_1__private_import_core__["c" /* reflector */].resolveIdentifier(identifier.name, identifier.moduleUrl, identifier.runtime);
-}
-/**
- * @param {?} identifier
- * @return {?}
- */
-function createIdentifier(identifier) {
- var /** @type {?} */ reference = __WEBPACK_IMPORTED_MODULE_1__private_import_core__["c" /* reflector */].resolveIdentifier(identifier.name, identifier.moduleUrl, identifier.runtime);
- return { reference: reference };
-}
-/**
- * @param {?} identifier
- * @return {?}
- */
-function identifierToken(identifier) {
- return { identifier: identifier };
-}
-/**
- * @param {?} identifier
- * @return {?}
- */
-function createIdentifierToken(identifier) {
- return identifierToken(createIdentifier(identifier));
-}
-/**
- * @param {?} enumType
- * @param {?} name
- * @return {?}
- */
-function createEnumIdentifier(enumType, name) {
- var /** @type {?} */ resolvedEnum = __WEBPACK_IMPORTED_MODULE_1__private_import_core__["c" /* reflector */].resolveEnum(resolveIdentifier(enumType), name);
- return { reference: resolvedEnum };
-}
-//# sourceMappingURL=identifiers.js.map
/***/ }),
-/* 20 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 4 */
+/***/ (function(module, exports, __webpack_require__) {
+
+__webpack_require__(17);
+module.exports = 'ngResource';
-"use strict";
-/* harmony export (immutable) */ __webpack_exports__["a"] = CompilerInjectable;
-/**
- * A replacement for \@Injectable to be used in the compiler, so that
- * we don't try to evaluate the metadata in the compiler during AoT.
- * This decorator is enough to make the compiler work with the ReflectiveInjector though.
- * @return {?}
- */
-function CompilerInjectable() {
- return function (x) { return x; };
-}
-//# sourceMappingURL=injectable.js.map
/***/ }),
-/* 21 */
-/***/ (function(module, exports) {
+/* 5 */
+/***/ (function(module, exports, __webpack_require__) {
-var core = module.exports = {version: '2.4.0'};
-if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
+(function webpackUniversalModuleDefinition(root, factory) {
+ if(true)
+ module.exports = factory(__webpack_require__(0));
+ else if(typeof define === 'function' && define.amd)
+ define(["angular"], factory);
+ else {
+ var a = typeof exports === 'object' ? factory(require("angular")) : factory(root["angular"]);
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
+ }
+})(this, function(__WEBPACK_EXTERNAL_MODULE_5__) {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+/******/
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/******/
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+/******/
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+/******/
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+/******/
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/*!********************************!*\
+ !*** ./src/angular-spinner.ts ***!
+ \********************************/
+/***/ function(module, exports, __webpack_require__) {
-/***/ }),
-/* 22 */
-/***/ (function(module, exports) {
+ "use strict";
+ var SpinJSSpinner_1 = __webpack_require__(/*! ./Constants/SpinJSSpinner */ 1);
+ var UsSpinnerService_1 = __webpack_require__(/*! ./Services/UsSpinnerService */ 3);
+ var AngularSpinner_1 = __webpack_require__(/*! ./Directives/AngularSpinner */ 4);
+ var UsSpinnerConfig_1 = __webpack_require__(/*! ./Config/UsSpinnerConfig */ 6);
+ var angular = __webpack_require__(/*! angular */ 5);
+ exports.angularSpinner = angular
+ .module('angularSpinner', [])
+ .provider('usSpinnerConfig', UsSpinnerConfig_1.UsSpinnerConfig)
+ .constant('SpinJSSpinner', SpinJSSpinner_1.SpinJSSpinner)
+ .service('usSpinnerService', UsSpinnerService_1.UsSpinnerService)
+ .directive('usSpinner', AngularSpinner_1.usSpinner);
-// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
-var global = module.exports = typeof window != 'undefined' && window.Math == Math
- ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
-if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
-/***/ }),
-/* 23 */
-/***/ (function(module, exports, __webpack_require__) {
+/***/ },
+/* 1 */
+/*!****************************************!*\
+ !*** ./src/Constants/SpinJSSpinner.ts ***!
+ \****************************************/
+/***/ function(module, exports, __webpack_require__) {
-"use strict";
+ "use strict";
+ var Spinner = __webpack_require__(/*! spin.js */ 2);
+ /**
+ * Exporting the Spinner prototype from spin.js library
+ */
+ exports.SpinJSSpinner = Spinner;
-var isArray_1 = __webpack_require__(62);
-var isObject_1 = __webpack_require__(492);
-var isFunction_1 = __webpack_require__(207);
-var tryCatch_1 = __webpack_require__(28);
-var errorObject_1 = __webpack_require__(26);
-var UnsubscriptionError_1 = __webpack_require__(489);
-/**
- * Represents a disposable resource, such as the execution of an Observable. A
- * Subscription has one important method, `unsubscribe`, that takes no argument
- * and just disposes the resource held by the subscription.
- *
- * Additionally, subscriptions may be grouped together through the `add()`
- * method, which will attach a child Subscription to the current Subscription.
- * When a Subscription is unsubscribed, all its children (and its grandchildren)
- * will be unsubscribed as well.
- *
- * @class Subscription
- */
-var Subscription = (function () {
- /**
- * @param {function(): void} [unsubscribe] A function describing how to
- * perform the disposal of resources when the `unsubscribe` method is called.
- */
- function Subscription(unsubscribe) {
- /**
- * A flag to indicate whether this Subscription has already been unsubscribed.
- * @type {boolean}
- */
- this.closed = false;
- this._parent = null;
- this._parents = null;
- this._subscriptions = null;
- if (unsubscribe) {
- this._unsubscribe = unsubscribe;
- }
- }
- /**
- * Disposes the resources held by the subscription. May, for instance, cancel
- * an ongoing Observable execution or cancel any other type of work that
- * started when the Subscription was created.
- * @return {void}
- */
- Subscription.prototype.unsubscribe = function () {
- var hasErrors = false;
- var errors;
- if (this.closed) {
- return;
- }
- var _a = this, _parent = _a._parent, _parents = _a._parents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;
- this.closed = true;
- this._parent = null;
- this._parents = null;
- // null out _subscriptions first so any child subscriptions that attempt
- // to remove themselves from this subscription will noop
- this._subscriptions = null;
- var index = -1;
- var len = _parents ? _parents.length : 0;
- // if this._parent is null, then so is this._parents, and we
- // don't have to remove ourselves from any parent subscriptions.
- while (_parent) {
- _parent.remove(this);
- // if this._parents is null or index >= len,
- // then _parent is set to null, and the loop exits
- _parent = ++index < len && _parents[index] || null;
- }
- if (isFunction_1.isFunction(_unsubscribe)) {
- var trial = tryCatch_1.tryCatch(_unsubscribe).call(this);
- if (trial === errorObject_1.errorObject) {
- hasErrors = true;
- errors = errors || (errorObject_1.errorObject.e instanceof UnsubscriptionError_1.UnsubscriptionError ?
- flattenUnsubscriptionErrors(errorObject_1.errorObject.e.errors) : [errorObject_1.errorObject.e]);
- }
- }
- if (isArray_1.isArray(_subscriptions)) {
- index = -1;
- len = _subscriptions.length;
- while (++index < len) {
- var sub = _subscriptions[index];
- if (isObject_1.isObject(sub)) {
- var trial = tryCatch_1.tryCatch(sub.unsubscribe).call(sub);
- if (trial === errorObject_1.errorObject) {
- hasErrors = true;
- errors = errors || [];
- var err = errorObject_1.errorObject.e;
- if (err instanceof UnsubscriptionError_1.UnsubscriptionError) {
- errors = errors.concat(flattenUnsubscriptionErrors(err.errors));
- }
- else {
- errors.push(err);
- }
- }
- }
- }
- }
- if (hasErrors) {
- throw new UnsubscriptionError_1.UnsubscriptionError(errors);
- }
- };
- /**
- * Adds a tear down to be called during the unsubscribe() of this
- * Subscription.
- *
- * If the tear down being added is a subscription that is already
- * unsubscribed, is the same reference `add` is being called on, or is
- * `Subscription.EMPTY`, it will not be added.
- *
- * If this subscription is already in an `closed` state, the passed
- * tear down logic will be executed immediately.
- *
- * @param {TeardownLogic} teardown The additional logic to execute on
- * teardown.
- * @return {Subscription} Returns the Subscription used or created to be
- * added to the inner subscriptions list. This Subscription can be used with
- * `remove()` to remove the passed teardown logic from the inner subscriptions
- * list.
- */
- Subscription.prototype.add = function (teardown) {
- if (!teardown || (teardown === Subscription.EMPTY)) {
- return Subscription.EMPTY;
- }
- if (teardown === this) {
- return this;
- }
- var subscription = teardown;
- switch (typeof teardown) {
- case 'function':
- subscription = new Subscription(teardown);
- case 'object':
- if (subscription.closed || typeof subscription.unsubscribe !== 'function') {
- return subscription;
- }
- else if (this.closed) {
- subscription.unsubscribe();
- return subscription;
- }
- else if (typeof subscription._addParent !== 'function' /* quack quack */) {
- var tmp = subscription;
- subscription = new Subscription();
- subscription._subscriptions = [tmp];
- }
- break;
- default:
- throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
- }
- var subscriptions = this._subscriptions || (this._subscriptions = []);
- subscriptions.push(subscription);
- subscription._addParent(this);
- return subscription;
- };
- /**
- * Removes a Subscription from the internal list of subscriptions that will
- * unsubscribe during the unsubscribe process of this Subscription.
- * @param {Subscription} subscription The subscription to remove.
- * @return {void}
- */
- Subscription.prototype.remove = function (subscription) {
- var subscriptions = this._subscriptions;
- if (subscriptions) {
- var subscriptionIndex = subscriptions.indexOf(subscription);
- if (subscriptionIndex !== -1) {
- subscriptions.splice(subscriptionIndex, 1);
- }
- }
- };
- Subscription.prototype._addParent = function (parent) {
- var _a = this, _parent = _a._parent, _parents = _a._parents;
- if (!_parent || _parent === parent) {
- // If we don't have a parent, or the new parent is the same as the
- // current parent, then set this._parent to the new parent.
- this._parent = parent;
- }
- else if (!_parents) {
- // If there's already one parent, but not multiple, allocate an Array to
- // store the rest of the parent Subscriptions.
- this._parents = [parent];
- }
- else if (_parents.indexOf(parent) === -1) {
- // Only add the new parent to the _parents list if it's not already there.
- _parents.push(parent);
- }
- };
- Subscription.EMPTY = (function (empty) {
- empty.closed = true;
- return empty;
- }(new Subscription()));
- return Subscription;
-}());
-exports.Subscription = Subscription;
-function flattenUnsubscriptionErrors(errors) {
- return errors.reduce(function (errs, err) { return errs.concat((err instanceof UnsubscriptionError_1.UnsubscriptionError) ? err.errors : err); }, []);
-}
-//# sourceMappingURL=Subscription.js.map
-/***/ }),
-/* 24 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/***/ },
+/* 2 */
+/*!***************************!*\
+ !*** ./~/spin.js/spin.js ***!
+ \***************************/
+/***/ function(module, exports, __webpack_require__) {
-"use strict";
-/* harmony export (immutable) */ __webpack_exports__["b"] = getDOM;
-/* unused harmony export setDOM */
-/* harmony export (immutable) */ __webpack_exports__["c"] = setRootDomAdapter;
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DomAdapter; });
-/**
- * @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 /** @type {?} */ _DOM = null;
-/**
- * @return {?}
- */
-function getDOM() {
- return _DOM;
-}
-/**
- * @param {?} adapter
- * @return {?}
- */
-function setDOM(adapter) {
- _DOM = adapter;
-}
-/**
- * @param {?} adapter
- * @return {?}
- */
-function setRootDomAdapter(adapter) {
- if (!_DOM) {
- _DOM = adapter;
- }
-}
-/**
- * Provides DOM operations in an environment-agnostic way.
- *
- * \@security Tread carefully! Interacting with the DOM directly is dangerous and
- * can introduce XSS risks.
- * @abstract
- */
-var DomAdapter = (function () {
- function DomAdapter() {
- this.resourceLoaderType = null;
- }
- /**
- * @abstract
- * @param {?} element
- * @param {?} name
- * @return {?}
- */
- DomAdapter.prototype.hasProperty = function (element /** TODO #9100 */, name) { };
- /**
- * @abstract
- * @param {?} el
- * @param {?} name
- * @param {?} value
- * @return {?}
- */
- DomAdapter.prototype.setProperty = function (el, name, value) { };
- /**
- * @abstract
- * @param {?} el
- * @param {?} name
- * @return {?}
- */
- DomAdapter.prototype.getProperty = function (el, name) { };
- /**
- * @abstract
- * @param {?} el
- * @param {?} methodName
- * @param {?} args
- * @return {?}
- */
- DomAdapter.prototype.invoke = function (el, methodName, args) { };
- /**
- * @abstract
- * @param {?} error
- * @return {?}
- */
- DomAdapter.prototype.logError = function (error) { };
- /**
- * @abstract
- * @param {?} error
- * @return {?}
- */
- DomAdapter.prototype.log = function (error) { };
- /**
- * @abstract
- * @param {?} error
- * @return {?}
- */
- DomAdapter.prototype.logGroup = function (error) { };
- /**
- * @abstract
- * @return {?}
- */
- DomAdapter.prototype.logGroupEnd = function () { };
- Object.defineProperty(DomAdapter.prototype, "attrToPropMap", {
- /**
- * Maps attribute names to their corresponding property names for cases
- * where attribute name doesn't match property name.
- * @return {?}
- */
- get: function () { return this._attrToPropMap; },
- /**
- * @param {?} value
- * @return {?}
- */
- set: function (value) { this._attrToPropMap = value; },
- enumerable: true,
- configurable: true
- });
- ;
- ;
- /**
- * @abstract
- * @param {?} templateHtml
- * @return {?}
- */
- DomAdapter.prototype.parse = function (templateHtml) { };
- /**
- * @abstract
- * @param {?} selector
- * @return {?}
- */
- DomAdapter.prototype.query = function (selector) { };
- /**
- * @abstract
- * @param {?} el
- * @param {?} selector
- * @return {?}
- */
- DomAdapter.prototype.querySelector = function (el /** TODO #9100 */, selector) { };
- /**
- * @abstract
- * @param {?} el
- * @param {?} selector
- * @return {?}
- */
- DomAdapter.prototype.querySelectorAll = function (el /** TODO #9100 */, selector) { };
- /**
- * @abstract
- * @param {?} el
- * @param {?} evt
- * @param {?} listener
- * @return {?}
- */
- DomAdapter.prototype.on = function (el /** TODO #9100 */, evt /** TODO #9100 */, listener) { };
- /**
- * @abstract
- * @param {?} el
- * @param {?} evt
- * @param {?} listener
- * @return {?}
- */
- DomAdapter.prototype.onAndCancel = function (el /** TODO #9100 */, evt /** TODO #9100 */, listener) { };
- /**
- * @abstract
- * @param {?} el
- * @param {?} evt
- * @return {?}
- */
- DomAdapter.prototype.dispatchEvent = function (el /** TODO #9100 */, evt) { };
- /**
- * @abstract
- * @param {?} eventType
- * @return {?}
- */
- DomAdapter.prototype.createMouseEvent = function (eventType) { };
- /**
- * @abstract
- * @param {?} eventType
- * @return {?}
- */
- DomAdapter.prototype.createEvent = function (eventType) { };
- /**
- * @abstract
- * @param {?} evt
- * @return {?}
- */
- DomAdapter.prototype.preventDefault = function (evt) { };
- /**
- * @abstract
- * @param {?} evt
- * @return {?}
- */
- DomAdapter.prototype.isPrevented = function (evt) { };
- /**
- * @abstract
- * @param {?} el
- * @return {?}
- */
- DomAdapter.prototype.getInnerHTML = function (el) { };
- /**
- * Returns content if el is a element, null otherwise.
- * @abstract
- * @param {?} el
- * @return {?}
- */
- DomAdapter.prototype.getTemplateContent = function (el) { };
- /**
- * @abstract
- * @param {?} el
- * @return {?}
- */
- DomAdapter.prototype.getOuterHTML = function (el) { };
- /**
- * @abstract
- * @param {?} node
- * @return {?}
- */
- DomAdapter.prototype.nodeName = function (node) { };
- /**
- * @abstract
- * @param {?} node
- * @return {?}
- */
- DomAdapter.prototype.nodeValue = function (node) { };
- /**
- * @abstract
- * @param {?} node
- * @return {?}
- */
- DomAdapter.prototype.type = function (node) { };
- /**
- * @abstract
- * @param {?} node
- * @return {?}
- */
- DomAdapter.prototype.content = function (node) { };
- /**
- * @abstract
- * @param {?} el
- * @return {?}
- */
- DomAdapter.prototype.firstChild = function (el) { };
- /**
- * @abstract
- * @param {?} el
- * @return {?}
- */
- DomAdapter.prototype.nextSibling = function (el) { };
- /**
- * @abstract
- * @param {?} el
- * @return {?}
- */
- DomAdapter.prototype.parentElement = function (el) { };
- /**
- * @abstract
- * @param {?} el
- * @return {?}
- */
- DomAdapter.prototype.childNodes = function (el) { };
- /**
- * @abstract
- * @param {?} el
- * @return {?}
- */
- DomAdapter.prototype.childNodesAsList = function (el) { };
- /**
- * @abstract
- * @param {?} el
- * @return {?}
- */
- DomAdapter.prototype.clearNodes = function (el) { };
- /**
- * @abstract
- * @param {?} el
- * @param {?} node
- * @return {?}
- */
- DomAdapter.prototype.appendChild = function (el /** TODO #9100 */, node) { };
- /**
- * @abstract
- * @param {?} el
- * @param {?} node
- * @return {?}
- */
- DomAdapter.prototype.removeChild = function (el /** TODO #9100 */, node) { };
- /**
- * @abstract
- * @param {?} el
- * @param {?} newNode
- * @param {?} oldNode
- * @return {?}
- */
- DomAdapter.prototype.replaceChild = function (el /** TODO #9100 */, newNode /** TODO #9100 */, oldNode) { };
- /**
- * @abstract
- * @param {?} el
- * @return {?}
- */
- DomAdapter.prototype.remove = function (el) { };
- /**
- * @abstract
- * @param {?} el
- * @param {?} node
- * @return {?}
- */
- DomAdapter.prototype.insertBefore = function (el /** TODO #9100 */, node) { };
- /**
- * @abstract
- * @param {?} el
- * @param {?} nodes
- * @return {?}
- */
- DomAdapter.prototype.insertAllBefore = function (el /** TODO #9100 */, nodes) { };
- /**
- * @abstract
- * @param {?} el
- * @param {?} node
- * @return {?}
- */
- DomAdapter.prototype.insertAfter = function (el /** TODO #9100 */, node) { };
- /**
- * @abstract
- * @param {?} el
- * @param {?} value
- * @return {?}
- */
- DomAdapter.prototype.setInnerHTML = function (el /** TODO #9100 */, value) { };
- /**
- * @abstract
- * @param {?} el
- * @return {?}
- */
- DomAdapter.prototype.getText = function (el) { };
- /**
- * @abstract
- * @param {?} el
- * @param {?} value
- * @return {?}
- */
- DomAdapter.prototype.setText = function (el /** TODO #9100 */, value) { };
- /**
- * @abstract
- * @param {?} el
- * @return {?}
- */
- DomAdapter.prototype.getValue = function (el) { };
- /**
- * @abstract
- * @param {?} el
- * @param {?} value
- * @return {?}
- */
- DomAdapter.prototype.setValue = function (el /** TODO #9100 */, value) { };
- /**
- * @abstract
- * @param {?} el
- * @return {?}
- */
- DomAdapter.prototype.getChecked = function (el) { };
- /**
- * @abstract
- * @param {?} el
- * @param {?} value
- * @return {?}
- */
- DomAdapter.prototype.setChecked = function (el /** TODO #9100 */, value) { };
- /**
- * @abstract
- * @param {?} text
- * @return {?}
- */
- DomAdapter.prototype.createComment = function (text) { };
- /**
- * @abstract
- * @param {?} html
- * @return {?}
- */
- DomAdapter.prototype.createTemplate = function (html) { };
- /**
- * @abstract
- * @param {?} tagName
- * @param {?=} doc
- * @return {?}
- */
- DomAdapter.prototype.createElement = function (tagName /** TODO #9100 */, doc) { };
- /**
- * @abstract
- * @param {?} ns
- * @param {?} tagName
- * @param {?=} doc
- * @return {?}
- */
- DomAdapter.prototype.createElementNS = function (ns, tagName, doc) { };
- /**
- * @abstract
- * @param {?} text
- * @param {?=} doc
- * @return {?}
- */
- DomAdapter.prototype.createTextNode = function (text, doc) { };
- /**
- * @abstract
- * @param {?} attrName
- * @param {?} attrValue
- * @param {?=} doc
- * @return {?}
- */
- DomAdapter.prototype.createScriptTag = function (attrName, attrValue, doc) { };
- /**
- * @abstract
- * @param {?} css
- * @param {?=} doc
- * @return {?}
- */
- DomAdapter.prototype.createStyleElement = function (css, doc) { };
- /**
- * @abstract
- * @param {?} el
- * @return {?}
- */
- DomAdapter.prototype.createShadowRoot = function (el) { };
- /**
- * @abstract
- * @param {?} el
- * @return {?}
- */
- DomAdapter.prototype.getShadowRoot = function (el) { };
- /**
- * @abstract
- * @param {?} el
- * @return {?}
- */
- DomAdapter.prototype.getHost = function (el) { };
- /**
- * @abstract
- * @param {?} el
- * @return {?}
- */
- DomAdapter.prototype.getDistributedNodes = function (el) { };
- /**
- * @abstract
- * @param {?} node
- * @return {?}
- */
- DomAdapter.prototype.clone /**/ = function (node) { };
- /**
- * @abstract
- * @param {?} element
- * @param {?} name
- * @return {?}
- */
- DomAdapter.prototype.getElementsByClassName = function (element /** TODO #9100 */, name) { };
- /**
- * @abstract
- * @param {?} element
- * @param {?} name
- * @return {?}
- */
- DomAdapter.prototype.getElementsByTagName = function (element /** TODO #9100 */, name) { };
- /**
- * @abstract
- * @param {?} element
- * @return {?}
- */
- DomAdapter.prototype.classList = function (element) { };
- /**
- * @abstract
- * @param {?} element
- * @param {?} className
- * @return {?}
- */
- DomAdapter.prototype.addClass = function (element /** TODO #9100 */, className) { };
- /**
- * @abstract
- * @param {?} element
- * @param {?} className
- * @return {?}
- */
- DomAdapter.prototype.removeClass = function (element /** TODO #9100 */, className) { };
- /**
- * @abstract
- * @param {?} element
- * @param {?} className
- * @return {?}
- */
- DomAdapter.prototype.hasClass = function (element /** TODO #9100 */, className) { };
- /**
- * @abstract
- * @param {?} element
- * @param {?} styleName
- * @param {?} styleValue
- * @return {?}
- */
- DomAdapter.prototype.setStyle = function (element /** TODO #9100 */, styleName, styleValue) { };
- /**
- * @abstract
- * @param {?} element
- * @param {?} styleName
- * @return {?}
- */
- DomAdapter.prototype.removeStyle = function (element /** TODO #9100 */, styleName) { };
- /**
- * @abstract
- * @param {?} element
- * @param {?} styleName
- * @return {?}
- */
- DomAdapter.prototype.getStyle = function (element /** TODO #9100 */, styleName) { };
- /**
- * @abstract
- * @param {?} element
- * @param {?} styleName
- * @param {?=} styleValue
- * @return {?}
- */
- DomAdapter.prototype.hasStyle = function (element /** TODO #9100 */, styleName, styleValue) { };
- /**
- * @abstract
- * @param {?} element
- * @return {?}
- */
- DomAdapter.prototype.tagName = function (element) { };
- /**
- * @abstract
- * @param {?} element
- * @return {?}
- */
- DomAdapter.prototype.attributeMap = function (element) { };
- /**
- * @abstract
- * @param {?} element
- * @param {?} attribute
- * @return {?}
- */
- DomAdapter.prototype.hasAttribute = function (element /** TODO #9100 */, attribute) { };
- /**
- * @abstract
- * @param {?} element
- * @param {?} ns
- * @param {?} attribute
- * @return {?}
- */
- DomAdapter.prototype.hasAttributeNS = function (element /** TODO #9100 */, ns, attribute) { };
- /**
- * @abstract
- * @param {?} element
- * @param {?} attribute
- * @return {?}
- */
- DomAdapter.prototype.getAttribute = function (element /** TODO #9100 */, attribute) { };
- /**
- * @abstract
- * @param {?} element
- * @param {?} ns
- * @param {?} attribute
- * @return {?}
- */
- DomAdapter.prototype.getAttributeNS = function (element /** TODO #9100 */, ns, attribute) { };
- /**
- * @abstract
- * @param {?} element
- * @param {?} name
- * @param {?} value
- * @return {?}
- */
- DomAdapter.prototype.setAttribute = function (element /** TODO #9100 */, name, value) { };
- /**
- * @abstract
- * @param {?} element
- * @param {?} ns
- * @param {?} name
- * @param {?} value
- * @return {?}
- */
- DomAdapter.prototype.setAttributeNS = function (element /** TODO #9100 */, ns, name, value) { };
- /**
- * @abstract
- * @param {?} element
- * @param {?} attribute
- * @return {?}
- */
- DomAdapter.prototype.removeAttribute = function (element /** TODO #9100 */, attribute) { };
- /**
- * @abstract
- * @param {?} element
- * @param {?} ns
- * @param {?} attribute
- * @return {?}
- */
- DomAdapter.prototype.removeAttributeNS = function (element /** TODO #9100 */, ns, attribute) { };
- /**
- * @abstract
- * @param {?} el
- * @return {?}
- */
- DomAdapter.prototype.templateAwareRoot = function (el) { };
- /**
- * @abstract
- * @return {?}
- */
- DomAdapter.prototype.createHtmlDocument = function () { };
- /**
- * @abstract
- * @return {?}
- */
- DomAdapter.prototype.defaultDoc = function () { };
- /**
- * @abstract
- * @param {?} el
- * @return {?}
- */
- DomAdapter.prototype.getBoundingClientRect = function (el) { };
- /**
- * @abstract
- * @return {?}
- */
- DomAdapter.prototype.getTitle = function () { };
- /**
- * @abstract
- * @param {?} newTitle
- * @return {?}
- */
- DomAdapter.prototype.setTitle = function (newTitle) { };
- /**
- * @abstract
- * @param {?} n
- * @param {?} selector
- * @return {?}
- */
- DomAdapter.prototype.elementMatches = function (n /** TODO #9100 */, selector) { };
- /**
- * @abstract
- * @param {?} el
- * @return {?}
- */
- DomAdapter.prototype.isTemplateElement = function (el) { };
- /**
- * @abstract
- * @param {?} node
- * @return {?}
- */
- DomAdapter.prototype.isTextNode = function (node) { };
- /**
- * @abstract
- * @param {?} node
- * @return {?}
- */
- DomAdapter.prototype.isCommentNode = function (node) { };
- /**
- * @abstract
- * @param {?} node
- * @return {?}
- */
- DomAdapter.prototype.isElementNode = function (node) { };
- /**
- * @abstract
- * @param {?} node
- * @return {?}
- */
- DomAdapter.prototype.hasShadowRoot = function (node) { };
- /**
- * @abstract
- * @param {?} node
- * @return {?}
- */
- DomAdapter.prototype.isShadowRoot = function (node) { };
- /**
- * @abstract
- * @param {?} node
- * @return {?}
- */
- DomAdapter.prototype.importIntoDoc /**/ = function (node) { };
- /**
- * @abstract
- * @param {?} node
- * @return {?}
- */
- DomAdapter.prototype.adoptNode /**/ = function (node) { };
- /**
- * @abstract
- * @param {?} element
- * @return {?}
- */
- DomAdapter.prototype.getHref = function (element) { };
- /**
- * @abstract
- * @param {?} event
- * @return {?}
- */
- DomAdapter.prototype.getEventKey = function (event) { };
- /**
- * @abstract
- * @param {?} element
- * @param {?} baseUrl
- * @param {?} href
- * @return {?}
- */
- DomAdapter.prototype.resolveAndSetHref = function (element /** TODO #9100 */, baseUrl, href) { };
- /**
- * @abstract
- * @return {?}
- */
- DomAdapter.prototype.supportsDOMEvents = function () { };
- /**
- * @abstract
- * @return {?}
- */
- DomAdapter.prototype.supportsNativeShadowDOM = function () { };
- /**
- * @abstract
- * @param {?} target
- * @return {?}
- */
- DomAdapter.prototype.getGlobalEventTarget = function (target) { };
- /**
- * @abstract
- * @return {?}
- */
- DomAdapter.prototype.getHistory = function () { };
- /**
- * @abstract
- * @return {?}
- */
- DomAdapter.prototype.getLocation = function () { };
- /**
- * @abstract
- * @return {?}
- */
- DomAdapter.prototype.getBaseHref = function () { };
- /**
- * @abstract
- * @return {?}
- */
- DomAdapter.prototype.resetBaseElement = function () { };
- /**
- * @abstract
- * @return {?}
- */
- DomAdapter.prototype.getUserAgent = function () { };
- /**
- * @abstract
- * @param {?} element
- * @param {?} name
- * @param {?} value
- * @return {?}
- */
- DomAdapter.prototype.setData = function (element /** TODO #9100 */, name, value) { };
- /**
- * @abstract
- * @param {?} element
- * @return {?}
- */
- DomAdapter.prototype.getComputedStyle = function (element) { };
- /**
- * @abstract
- * @param {?} element
- * @param {?} name
- * @return {?}
- */
- DomAdapter.prototype.getData = function (element /** TODO #9100 */, name) { };
- /**
- * @abstract
- * @param {?} name
- * @param {?} value
- * @return {?}
- */
- DomAdapter.prototype.setGlobalVar = function (name, value) { };
- /**
- * @abstract
- * @return {?}
- */
- DomAdapter.prototype.supportsWebAnimation = function () { };
- /**
- * @abstract
- * @return {?}
- */
- DomAdapter.prototype.performanceNow = function () { };
- /**
- * @abstract
- * @return {?}
- */
- DomAdapter.prototype.getAnimationPrefix = function () { };
- /**
- * @abstract
- * @return {?}
- */
- DomAdapter.prototype.getTransitionEnd = function () { };
- /**
- * @abstract
- * @return {?}
- */
- DomAdapter.prototype.supportsAnimation = function () { };
- /**
- * @abstract
- * @return {?}
- */
- DomAdapter.prototype.supportsCookies = function () { };
- /**
- * @abstract
- * @param {?} name
- * @return {?}
- */
- DomAdapter.prototype.getCookie = function (name) { };
- /**
- * @abstract
- * @param {?} name
- * @param {?} value
- * @return {?}
- */
- DomAdapter.prototype.setCookie = function (name, value) { };
- return DomAdapter;
-}());
-function DomAdapter_tsickle_Closure_declarations() {
- /** @type {?} */
- DomAdapter.prototype.resourceLoaderType;
- /**
- * \@internal
- * @type {?}
- */
- DomAdapter.prototype._attrToPropMap;
-}
-//# sourceMappingURL=dom_adapter.js.map
-
-/***/ }),
-/* 25 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var anObject = __webpack_require__(9)
- , IE8_DOM_DEFINE = __webpack_require__(430)
- , toPrimitive = __webpack_require__(88)
- , dP = Object.defineProperty;
-
-exports.f = __webpack_require__(29) ? Object.defineProperty : function defineProperty(O, P, Attributes){
- anObject(O);
- P = toPrimitive(P, true);
- anObject(Attributes);
- if(IE8_DOM_DEFINE)try {
- return dP(O, P, Attributes);
- } catch(e){ /* empty */ }
- if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
- if('value' in Attributes)O[P] = Attributes.value;
- return O;
-};
-
-/***/ }),
-/* 26 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// typeof any so that it we don't have to cast when comparing a result to the error object
-exports.errorObject = { e: {} };
-//# sourceMappingURL=errorObject.js.map
-
-/***/ }),
-/* 27 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* WEBPACK VAR INJECTION */(function(global) {
-/**
- * window: browser in DOM main thread
- * self: browser in WebWorker
- * global: Node.js/other
- */
-exports.root = (typeof window == 'object' && window.window === window && window
- || typeof self == 'object' && self.self === self && self
- || typeof global == 'object' && global.global === global && global);
-if (!exports.root) {
- throw new Error('RxJS could not find any global context (window, self, global)');
-}
-//# sourceMappingURL=root.js.map
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(53)))
-
-/***/ }),
-/* 28 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var errorObject_1 = __webpack_require__(26);
-var tryCatchTarget;
-function tryCatcher() {
- try {
- return tryCatchTarget.apply(this, arguments);
- }
- catch (e) {
- errorObject_1.errorObject.e = e;
- return errorObject_1.errorObject;
- }
-}
-function tryCatch(fn) {
- tryCatchTarget = fn;
- return tryCatcher;
-}
-exports.tryCatch = tryCatch;
-;
-//# sourceMappingURL=tryCatch.js.map
-
-/***/ }),
-/* 29 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// Thank's IE8 for his funny defineProperty
-module.exports = !__webpack_require__(11)(function(){
- return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
-});
-
-/***/ }),
-/* 30 */,
-/* 31 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-exports.notImplemented = function (fnname) { return function () {
- throw new Error(fnname + "(): No coreservices implementation for UI-Router is loaded.");
-}; };
-var services = {
- $q: undefined,
- $injector: undefined,
-};
-exports.services = services;
-//# sourceMappingURL=coreservices.js.map
-
-/***/ }),
-/* 32 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__facade_errors__ = __webpack_require__(551);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__facade_lang__ = __webpack_require__(6);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return MODULE_SUFFIX; });
-/* unused harmony export camelCaseToDashCase */
-/* harmony export (immutable) */ __webpack_exports__["d"] = dashCaseToCamelCase;
-/* harmony export (immutable) */ __webpack_exports__["a"] = splitAtColon;
-/* harmony export (immutable) */ __webpack_exports__["c"] = splitAtPeriod;
-/* harmony export (immutable) */ __webpack_exports__["b"] = visitValue;
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return ValueTransformer; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return SyncAsyncResult; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return SyntaxError; });
-/**
- * @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 = (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 /** @type {?} */ MODULE_SUFFIX = '';
-var /** @type {?} */ CAMEL_CASE_REGEXP = /([A-Z])/g;
-var /** @type {?} */ DASH_CASE_REGEXP = /-+([a-z0-9])/g;
-/**
- * @param {?} input
- * @return {?}
- */
-function camelCaseToDashCase(input) {
- return input.replace(CAMEL_CASE_REGEXP, function () {
- var m = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- m[_i - 0] = arguments[_i];
- }
- return '-' + m[1].toLowerCase();
- });
-}
-/**
- * @param {?} input
- * @return {?}
- */
-function dashCaseToCamelCase(input) {
- return input.replace(DASH_CASE_REGEXP, function () {
- var m = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- m[_i - 0] = arguments[_i];
- }
- return m[1].toUpperCase();
- });
-}
-/**
- * @param {?} input
- * @param {?} defaultValues
- * @return {?}
- */
-function splitAtColon(input, defaultValues) {
- return _splitAt(input, ':', defaultValues);
-}
-/**
- * @param {?} input
- * @param {?} defaultValues
- * @return {?}
- */
-function splitAtPeriod(input, defaultValues) {
- return _splitAt(input, '.', defaultValues);
-}
-/**
- * @param {?} input
- * @param {?} character
- * @param {?} defaultValues
- * @return {?}
- */
-function _splitAt(input, character, defaultValues) {
- var /** @type {?} */ characterIndex = input.indexOf(character);
- if (characterIndex == -1)
- return defaultValues;
- return [input.slice(0, characterIndex).trim(), input.slice(characterIndex + 1).trim()];
-}
-/**
- * @param {?} value
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
-function visitValue(value, visitor, context) {
- if (Array.isArray(value)) {
- return visitor.visitArray(/** @type {?} */ (value), context);
- }
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["a" /* isStrictStringMap */])(value)) {
- return visitor.visitStringMap(/** @type {?} */ (value), context);
- }
- if (value == null || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["b" /* isPrimitive */])(value)) {
- return visitor.visitPrimitive(value, context);
- }
- return visitor.visitOther(value, context);
-}
-var ValueTransformer = (function () {
- function ValueTransformer() {
- }
- /**
- * @param {?} arr
- * @param {?} context
- * @return {?}
- */
- ValueTransformer.prototype.visitArray = function (arr, context) {
- var _this = this;
- return arr.map(function (value) { return visitValue(value, _this, context); });
- };
- /**
- * @param {?} map
- * @param {?} context
- * @return {?}
- */
- ValueTransformer.prototype.visitStringMap = function (map, context) {
- var _this = this;
- var /** @type {?} */ result = {};
- Object.keys(map).forEach(function (key) { result[key] = visitValue(map[key], _this, context); });
- return result;
- };
- /**
- * @param {?} value
- * @param {?} context
- * @return {?}
- */
- ValueTransformer.prototype.visitPrimitive = function (value, context) { return value; };
- /**
- * @param {?} value
- * @param {?} context
- * @return {?}
- */
- ValueTransformer.prototype.visitOther = function (value, context) { return value; };
- return ValueTransformer;
-}());
-var SyncAsyncResult = (function () {
- /**
- * @param {?} syncResult
- * @param {?=} asyncResult
- */
- function SyncAsyncResult(syncResult, asyncResult) {
- if (asyncResult === void 0) { asyncResult = null; }
- this.syncResult = syncResult;
- this.asyncResult = asyncResult;
- if (!asyncResult) {
- this.asyncResult = Promise.resolve(syncResult);
- }
- }
- return SyncAsyncResult;
-}());
-function SyncAsyncResult_tsickle_Closure_declarations() {
- /** @type {?} */
- SyncAsyncResult.prototype.syncResult;
- /** @type {?} */
- SyncAsyncResult.prototype.asyncResult;
-}
-var SyntaxError = (function (_super) {
- __extends(SyntaxError, _super);
- function SyntaxError() {
- _super.apply(this, arguments);
- }
- return SyntaxError;
-}(__WEBPACK_IMPORTED_MODULE_0__facade_errors__["a" /* BaseError */]));
-//# sourceMappingURL=util.js.map
-
-/***/ }),
-/* 33 */
-/***/ (function(module, exports) {
-
-var hasOwnProperty = {}.hasOwnProperty;
-module.exports = function(it, key){
- return hasOwnProperty.call(it, key);
-};
-
-/***/ }),
-/* 34 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var global = __webpack_require__(22)
- , hide = __webpack_require__(58)
- , has = __webpack_require__(33)
- , SRC = __webpack_require__(139)('src')
- , TO_STRING = 'toString'
- , $toString = Function[TO_STRING]
- , TPL = ('' + $toString).split(TO_STRING);
-
-__webpack_require__(21).inspectSource = function(it){
- return $toString.call(it);
-};
-
-(module.exports = function(O, key, val, safe){
- var isFunction = typeof val == 'function';
- if(isFunction)has(val, 'name') || hide(val, 'name', key);
- if(O[key] === val)return;
- if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
- if(O === global){
- O[key] = val;
- } else {
- if(!safe){
- delete O[key];
- hide(O, key, val);
- } else {
- if(O[key])O[key] = val;
- else hide(O, key, val);
- }
- }
-// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
-})(Function.prototype, TO_STRING, function toString(){
- return typeof this == 'function' && this[SRC] || $toString.call(this);
-});
-
-/***/ }),
-/* 35 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var $export = __webpack_require__(2)
- , fails = __webpack_require__(11)
- , defined = __webpack_require__(57)
- , quot = /"/g;
-// B.2.3.2.1 CreateHTML(string, tag, attribute, value)
-var createHTML = function(string, tag, attribute, value) {
- var S = String(defined(string))
- , p1 = '<' + tag;
- if(attribute !== '')p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"';
- return p1 + '>' + S + '' + tag + '>';
-};
-module.exports = function(NAME, exec){
- var O = {};
- O[NAME] = exec(createHTML);
- $export($export.P + $export.F * fails(function(){
- var test = ''[NAME]('"');
- return test !== test.toLowerCase() || test.split('"').length > 3;
- }), 'String', O);
-};
-
-/***/ }),
-/* 36 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 7.1.15 ToLength
-var toInteger = __webpack_require__(103)
- , min = Math.min;
-module.exports = function(it){
- return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
-};
-
-/***/ }),
-/* 37 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/**
- * @coreapi
- * @module common
- */ /** */
-
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-__export(__webpack_require__(1081));
-__export(__webpack_require__(1088));
-__export(__webpack_require__(1089));
-__export(__webpack_require__(1090));
-__export(__webpack_require__(1091));
-__export(__webpack_require__(1092));
-__export(__webpack_require__(1093));
-__export(__webpack_require__(1094));
-__export(__webpack_require__(496));
-__export(__webpack_require__(501));
-__export(__webpack_require__(1087));
-//# sourceMappingURL=index.js.map
-
-/***/ }),
-/* 38 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__chars__ = __webpack_require__(155);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__facade_lang__ = __webpack_require__(6);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return ParseLocation; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ParseSourceFile; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ParseSourceSpan; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return ParseErrorLevel; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ParseError; });
-
-
-var ParseLocation = (function () {
- /**
- * @param {?} file
- * @param {?} offset
- * @param {?} line
- * @param {?} col
- */
- function ParseLocation(file, offset, line, col) {
- this.file = file;
- this.offset = offset;
- this.line = line;
- this.col = col;
- }
- /**
- * @return {?}
- */
- ParseLocation.prototype.toString = function () {
- return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["c" /* isPresent */])(this.offset) ? this.file.url + "@" + this.line + ":" + this.col : this.file.url;
- };
- /**
- * @param {?} delta
- * @return {?}
- */
- ParseLocation.prototype.moveBy = function (delta) {
- var /** @type {?} */ source = this.file.content;
- var /** @type {?} */ len = source.length;
- var /** @type {?} */ offset = this.offset;
- var /** @type {?} */ line = this.line;
- var /** @type {?} */ col = this.col;
- while (offset > 0 && delta < 0) {
- offset--;
- delta++;
- var /** @type {?} */ ch = source.charCodeAt(offset);
- if (ch == __WEBPACK_IMPORTED_MODULE_0__chars__["a" /* $LF */]) {
- line--;
- var /** @type {?} */ priorLine = source.substr(0, offset - 1).lastIndexOf(String.fromCharCode(__WEBPACK_IMPORTED_MODULE_0__chars__["a" /* $LF */]));
- col = priorLine > 0 ? offset - priorLine : offset;
- }
- else {
- col--;
- }
- }
- while (offset < len && delta > 0) {
- var /** @type {?} */ ch = source.charCodeAt(offset);
- offset++;
- delta--;
- if (ch == __WEBPACK_IMPORTED_MODULE_0__chars__["a" /* $LF */]) {
- line++;
- col = 0;
- }
- else {
- col++;
- }
- }
- return new ParseLocation(this.file, offset, line, col);
- };
- /**
- * @param {?} maxChars
- * @param {?} maxLines
- * @return {?}
- */
- ParseLocation.prototype.getContext = function (maxChars, maxLines) {
- var /** @type {?} */ content = this.file.content;
- var /** @type {?} */ startOffset = this.offset;
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["c" /* isPresent */])(startOffset)) {
- if (startOffset > content.length - 1) {
- startOffset = content.length - 1;
- }
- var /** @type {?} */ endOffset = startOffset;
- var /** @type {?} */ ctxChars = 0;
- var /** @type {?} */ ctxLines = 0;
- while (ctxChars < maxChars && startOffset > 0) {
- startOffset--;
- ctxChars++;
- if (content[startOffset] == '\n') {
- if (++ctxLines == maxLines) {
- break;
- }
- }
- }
- ctxChars = 0;
- ctxLines = 0;
- while (ctxChars < maxChars && endOffset < content.length - 1) {
- endOffset++;
- ctxChars++;
- if (content[endOffset] == '\n') {
- if (++ctxLines == maxLines) {
- break;
- }
- }
- }
- return {
- before: content.substring(startOffset, this.offset),
- after: content.substring(this.offset, endOffset + 1),
- };
- }
- return null;
- };
- return ParseLocation;
-}());
-function ParseLocation_tsickle_Closure_declarations() {
- /** @type {?} */
- ParseLocation.prototype.file;
- /** @type {?} */
- ParseLocation.prototype.offset;
- /** @type {?} */
- ParseLocation.prototype.line;
- /** @type {?} */
- ParseLocation.prototype.col;
-}
-var ParseSourceFile = (function () {
- /**
- * @param {?} content
- * @param {?} url
- */
- function ParseSourceFile(content, url) {
- this.content = content;
- this.url = url;
- }
- return ParseSourceFile;
-}());
-function ParseSourceFile_tsickle_Closure_declarations() {
- /** @type {?} */
- ParseSourceFile.prototype.content;
- /** @type {?} */
- ParseSourceFile.prototype.url;
-}
-var ParseSourceSpan = (function () {
- /**
- * @param {?} start
- * @param {?} end
- * @param {?=} details
- */
- function ParseSourceSpan(start, end, details) {
- if (details === void 0) { details = null; }
- this.start = start;
- this.end = end;
- this.details = details;
- }
- /**
- * @return {?}
- */
- ParseSourceSpan.prototype.toString = function () {
- return this.start.file.content.substring(this.start.offset, this.end.offset);
- };
- return ParseSourceSpan;
-}());
-function ParseSourceSpan_tsickle_Closure_declarations() {
- /** @type {?} */
- ParseSourceSpan.prototype.start;
- /** @type {?} */
- ParseSourceSpan.prototype.end;
- /** @type {?} */
- ParseSourceSpan.prototype.details;
-}
-var ParseErrorLevel = {};
-ParseErrorLevel.WARNING = 0;
-ParseErrorLevel.FATAL = 1;
-ParseErrorLevel[ParseErrorLevel.WARNING] = "WARNING";
-ParseErrorLevel[ParseErrorLevel.FATAL] = "FATAL";
-var ParseError = (function () {
- /**
- * @param {?} span
- * @param {?} msg
- * @param {?=} level
- */
- function ParseError(span, msg, level) {
- if (level === void 0) { level = ParseErrorLevel.FATAL; }
- this.span = span;
- this.msg = msg;
- this.level = level;
- }
- /**
- * @return {?}
- */
- ParseError.prototype.toString = function () {
- var /** @type {?} */ ctx = this.span.start.getContext(100, 3);
- var /** @type {?} */ contextStr = ctx ? " (\"" + ctx.before + "[ERROR ->]" + ctx.after + "\")" : '';
- var /** @type {?} */ details = this.span.details ? ", " + this.span.details : '';
- return "" + this.msg + contextStr + ": " + this.span.start + details;
- };
- return ParseError;
-}());
-function ParseError_tsickle_Closure_declarations() {
- /** @type {?} */
- ParseError.prototype.span;
- /** @type {?} */
- ParseError.prototype.msg;
- /** @type {?} */
- ParseError.prototype.level;
-}
-//# sourceMappingURL=parse_util.js.map
-
-/***/ }),
-/* 39 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__di_metadata__ = __webpack_require__(93);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_0__di_metadata__["d"]; });
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_0__di_metadata__["e"]; });
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__di_metadata__["a"]; });
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_0__di_metadata__["b"]; });
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__di_metadata__["c"]; });
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_0__di_metadata__["f"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__di_forward_ref__ = __webpack_require__(241);
-/* unused harmony reexport forwardRef */
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_1__di_forward_ref__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__di_injector__ = __webpack_require__(121);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_2__di_injector__["b"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__di_reflective_injector__ = __webpack_require__(583);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_3__di_reflective_injector__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__di_reflective_provider__ = __webpack_require__(244);
-/* unused harmony reexport ResolvedReflectiveFactory */
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__di_reflective_key__ = __webpack_require__(243);
-/* unused harmony reexport ReflectiveKey */
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__di_opaque_token__ = __webpack_require__(242);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_6__di_opaque_token__["a"]; });
-/**
- * @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
- */
-/**
- * @module
- * @description
- * The `di` module provides dependency injection container services.
- */
-
-
-
-
-
-
-
-//# sourceMappingURL=di.js.map
-
-/***/ }),
-/* 40 */,
-/* 41 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var fails = __webpack_require__(11);
-
-module.exports = function(method, arg){
- return !!method && fails(function(){
- arg ? method.call(null, function(){}, 1) : method.call(null);
- });
-};
-
-/***/ }),
-/* 42 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// to indexed object, toObject with fallback for non-array-like ES3 strings
-var IObject = __webpack_require__(135)
- , defined = __webpack_require__(57);
-module.exports = function(it){
- return IObject(defined(it));
-};
-
-/***/ }),
-/* 43 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 7.1.13 ToObject(argument)
-var defined = __webpack_require__(57);
-module.exports = function(it){
- return Object(defined(it));
-};
-
-/***/ }),
-/* 44 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* WEBPACK VAR INJECTION */(function(global) {/* unused harmony export scheduleMicroTask */
-/* unused harmony export global */
-/* harmony export (immutable) */ __webpack_exports__["d"] = getTypeNameForDebugging;
-/* harmony export (immutable) */ __webpack_exports__["g"] = isPresent;
-/* harmony export (immutable) */ __webpack_exports__["c"] = isBlank;
-/* unused harmony export isStrictStringMap */
-/* harmony export (immutable) */ __webpack_exports__["a"] = stringify;
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return NumberWrapper; });
-/* unused harmony export looseIdentical */
-/* harmony export (immutable) */ __webpack_exports__["e"] = isJsObject;
-/* unused harmony export print */
-/* unused harmony export warn */
-/* unused harmony export setValueOnPath */
-/* harmony export (immutable) */ __webpack_exports__["f"] = getSymbolIterator;
-/* unused harmony export isPrimitive */
-/* unused harmony export escapeRegExp */
-/**
- * @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 /** @type {?} */ globalScope;
-if (typeof window === 'undefined') {
- if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) {
- // TODO: Replace any with WorkerGlobalScope from lib.webworker.d.ts #3492
- globalScope = (self);
- }
- else {
- globalScope = (global);
- }
-}
-else {
- globalScope = (window);
-}
-/**
- * @param {?} fn
- * @return {?}
- */
-function scheduleMicroTask(fn) {
- Zone.current.scheduleMicroTask('scheduleMicrotask', fn);
-}
-// Need to declare a new variable for global here since TypeScript
-// exports the original value of the symbol.
-var /** @type {?} */ _global = globalScope;
-
-/**
- * @param {?} type
- * @return {?}
- */
-function getTypeNameForDebugging(type) {
- return type['name'] || typeof type;
-}
-// TODO: remove calls to assert in production environment
-// Note: Can't just export this and import in in other files
-// as `assert` is a reserved keyword in Dart
-_global.assert = function assert(condition) {
- // TODO: to be fixed properly via #2830, noop for now
-};
-/**
- * @param {?} obj
- * @return {?}
- */
-function isPresent(obj) {
- return obj != null;
-}
-/**
- * @param {?} obj
- * @return {?}
- */
-function isBlank(obj) {
- return obj == null;
-}
-var /** @type {?} */ STRING_MAP_PROTO = Object.getPrototypeOf({});
-/**
- * @param {?} obj
- * @return {?}
- */
-function isStrictStringMap(obj) {
- return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;
-}
-/**
- * @param {?} token
- * @return {?}
- */
-function stringify(token) {
- if (typeof token === 'string') {
- return token;
- }
- if (token == null) {
- return '' + token;
- }
- if (token.overriddenName) {
- return "" + token.overriddenName;
- }
- if (token.name) {
- return "" + token.name;
- }
- var /** @type {?} */ res = token.toString();
- var /** @type {?} */ newLineIndex = res.indexOf('\n');
- return newLineIndex === -1 ? res : res.substring(0, newLineIndex);
-}
-var NumberWrapper = (function () {
- function NumberWrapper() {
- }
- /**
- * @param {?} text
- * @return {?}
- */
- NumberWrapper.parseIntAutoRadix = function (text) {
- var /** @type {?} */ result = parseInt(text);
- if (isNaN(result)) {
- throw new Error('Invalid integer literal when parsing ' + text);
- }
- return result;
- };
- /**
- * @param {?} value
- * @return {?}
- */
- NumberWrapper.isNumeric = function (value) { return !isNaN(value - parseFloat(value)); };
- return NumberWrapper;
-}());
-/**
- * @param {?} a
- * @param {?} b
- * @return {?}
- */
-function looseIdentical(a, b) {
- return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);
-}
-/**
- * @param {?} o
- * @return {?}
- */
-function isJsObject(o) {
- return o !== null && (typeof o === 'function' || typeof o === 'object');
-}
-/**
- * @param {?} obj
- * @return {?}
- */
-function print(obj) {
- // tslint:disable-next-line:no-console
- console.log(obj);
-}
-/**
- * @param {?} obj
- * @return {?}
- */
-function warn(obj) {
- console.warn(obj);
-}
-/**
- * @param {?} global
- * @param {?} path
- * @param {?} value
- * @return {?}
- */
-function setValueOnPath(global, path, value) {
- var /** @type {?} */ parts = path.split('.');
- var /** @type {?} */ obj = global;
- while (parts.length > 1) {
- var /** @type {?} */ name_1 = parts.shift();
- if (obj.hasOwnProperty(name_1) && obj[name_1] != null) {
- obj = obj[name_1];
- }
- else {
- obj = obj[name_1] = {};
- }
- }
- if (obj === undefined || obj === null) {
- obj = {};
- }
- obj[parts.shift()] = value;
-}
-var /** @type {?} */ _symbolIterator = null;
-/**
- * @return {?}
- */
-function getSymbolIterator() {
- if (!_symbolIterator) {
- if (((globalScope)).Symbol && Symbol.iterator) {
- _symbolIterator = Symbol.iterator;
- }
- else {
- // es6-shim specific logic
- var /** @type {?} */ keys = Object.getOwnPropertyNames(Map.prototype);
- for (var /** @type {?} */ i = 0; i < keys.length; ++i) {
- var /** @type {?} */ key = keys[i];
- if (key !== 'entries' && key !== 'size' &&
- ((Map)).prototype[key] === Map.prototype['entries']) {
- _symbolIterator = key;
- }
- }
- }
- }
- return _symbolIterator;
-}
-/**
- * @param {?} obj
- * @return {?}
- */
-function isPrimitive(obj) {
- return !isJsObject(obj);
-}
-/**
- * @param {?} s
- * @return {?}
- */
-function escapeRegExp(s) {
- return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
-}
-//# sourceMappingURL=lang.js.map
-/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(53)))
-
-/***/ }),
-/* 45 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__facade_lang__ = __webpack_require__(6);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__identifiers__ = __webpack_require__(19);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__output_output_ast__ = __webpack_require__(10);
-/* harmony export (immutable) */ __webpack_exports__["b"] = createDiTokenExpression;
-/* harmony export (immutable) */ __webpack_exports__["a"] = createInlineArray;
-/* harmony export (immutable) */ __webpack_exports__["c"] = createPureProxy;
-/* harmony export (immutable) */ __webpack_exports__["d"] = createEnumExpression;
-/**
- * @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
- */
-
-
-
-/**
- * @param {?} token
- * @return {?}
- */
-function createDiTokenExpression(token) {
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__facade_lang__["c" /* isPresent */])(token.value)) {
- return __WEBPACK_IMPORTED_MODULE_2__output_output_ast__["f" /* literal */](token.value);
- }
- else {
- return __WEBPACK_IMPORTED_MODULE_2__output_output_ast__["g" /* importExpr */](token.identifier);
- }
-}
-/**
- * @param {?} values
- * @return {?}
- */
-function createInlineArray(values) {
- if (values.length === 0) {
- return __WEBPACK_IMPORTED_MODULE_2__output_output_ast__["g" /* importExpr */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__identifiers__["a" /* createIdentifier */])(__WEBPACK_IMPORTED_MODULE_1__identifiers__["b" /* Identifiers */].EMPTY_INLINE_ARRAY));
- }
- var /** @type {?} */ log2 = Math.log(values.length) / Math.log(2);
- var /** @type {?} */ index = Math.ceil(log2);
- var /** @type {?} */ identifierSpec = index < __WEBPACK_IMPORTED_MODULE_1__identifiers__["b" /* Identifiers */].inlineArrays.length ? __WEBPACK_IMPORTED_MODULE_1__identifiers__["b" /* Identifiers */].inlineArrays[index] :
- __WEBPACK_IMPORTED_MODULE_1__identifiers__["b" /* Identifiers */].InlineArrayDynamic;
- var /** @type {?} */ identifier = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__identifiers__["a" /* createIdentifier */])(identifierSpec);
- return __WEBPACK_IMPORTED_MODULE_2__output_output_ast__["g" /* importExpr */](identifier).instantiate([(__WEBPACK_IMPORTED_MODULE_2__output_output_ast__["f" /* literal */](values.length))
- ].concat(values));
-}
-/**
- * @param {?} fn
- * @param {?} argCount
- * @param {?} pureProxyProp
- * @param {?} builder
- * @return {?}
- */
-function createPureProxy(fn, argCount, pureProxyProp, builder) {
- builder.fields.push(new __WEBPACK_IMPORTED_MODULE_2__output_output_ast__["c" /* ClassField */](pureProxyProp.name, null));
- var /** @type {?} */ pureProxyId = argCount < __WEBPACK_IMPORTED_MODULE_1__identifiers__["b" /* Identifiers */].pureProxies.length ? __WEBPACK_IMPORTED_MODULE_1__identifiers__["b" /* Identifiers */].pureProxies[argCount] : null;
- if (!pureProxyId) {
- throw new Error("Unsupported number of argument for pure functions: " + argCount);
- }
- builder.ctorStmts.push(__WEBPACK_IMPORTED_MODULE_2__output_output_ast__["e" /* THIS_EXPR */].prop(pureProxyProp.name)
- .set(__WEBPACK_IMPORTED_MODULE_2__output_output_ast__["g" /* importExpr */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__identifiers__["a" /* createIdentifier */])(pureProxyId)).callFn([fn]))
- .toStmt());
-}
-/**
- * @param {?} enumType
- * @param {?} enumValue
- * @return {?}
- */
-function createEnumExpression(enumType, enumValue) {
- var /** @type {?} */ enumName = Object.keys(enumType.runtime).find(function (propName) { return enumType.runtime[propName] === enumValue; });
- if (!enumName) {
- throw new Error("Unknown enum value " + enumValue + " in " + enumType.name);
- }
- return __WEBPACK_IMPORTED_MODULE_2__output_output_ast__["g" /* importExpr */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__identifiers__["d" /* createEnumIdentifier */])(enumType, enumName));
-}
-//# sourceMappingURL=identifier_util.js.map
-
-/***/ }),
-/* 46 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assertions__ = __webpack_require__(334);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return InterpolationConfig; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DEFAULT_INTERPOLATION_CONFIG; });
-/**
- * @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 InterpolationConfig = (function () {
- /**
- * @param {?} start
- * @param {?} end
- */
- function InterpolationConfig(start, end) {
- this.start = start;
- this.end = end;
- }
- /**
- * @param {?} markers
- * @return {?}
- */
- InterpolationConfig.fromArray = function (markers) {
- if (!markers) {
- return DEFAULT_INTERPOLATION_CONFIG;
- }
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__assertions__["a" /* assertInterpolationSymbols */])('interpolation', markers);
- return new InterpolationConfig(markers[0], markers[1]);
- };
- ;
- return InterpolationConfig;
-}());
-function InterpolationConfig_tsickle_Closure_declarations() {
- /** @type {?} */
- InterpolationConfig.prototype.start;
- /** @type {?} */
- InterpolationConfig.prototype.end;
-}
-var /** @type {?} */ DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig('{{', '}}');
-//# sourceMappingURL=interpolation_config.js.map
-
-/***/ }),
-/* 47 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return TextAst; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return BoundTextAst; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return AttrAst; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return BoundElementPropertyAst; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return BoundEventAst; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return ReferenceAst; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return VariableAst; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return ElementAst; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return EmbeddedTemplateAst; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return BoundDirectivePropertyAst; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return DirectiveAst; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ProviderAst; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ProviderAstType; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return NgContentAst; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return PropertyBindingType; });
-/* harmony export (immutable) */ __webpack_exports__["a"] = templateVisitAll;
-/**
- * @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 segment of text within the template.
- */
-var TextAst = (function () {
- /**
- * @param {?} value
- * @param {?} ngContentIndex
- * @param {?} sourceSpan
- */
- function TextAst(value, ngContentIndex, sourceSpan) {
- this.value = value;
- this.ngContentIndex = ngContentIndex;
- this.sourceSpan = sourceSpan;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- TextAst.prototype.visit = function (visitor, context) { return visitor.visitText(this, context); };
- return TextAst;
-}());
-function TextAst_tsickle_Closure_declarations() {
- /** @type {?} */
- TextAst.prototype.value;
- /** @type {?} */
- TextAst.prototype.ngContentIndex;
- /** @type {?} */
- TextAst.prototype.sourceSpan;
-}
-/**
- * A bound expression within the text of a template.
- */
-var BoundTextAst = (function () {
- /**
- * @param {?} value
- * @param {?} ngContentIndex
- * @param {?} sourceSpan
- */
- function BoundTextAst(value, ngContentIndex, sourceSpan) {
- this.value = value;
- this.ngContentIndex = ngContentIndex;
- this.sourceSpan = sourceSpan;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- BoundTextAst.prototype.visit = function (visitor, context) {
- return visitor.visitBoundText(this, context);
- };
- return BoundTextAst;
-}());
-function BoundTextAst_tsickle_Closure_declarations() {
- /** @type {?} */
- BoundTextAst.prototype.value;
- /** @type {?} */
- BoundTextAst.prototype.ngContentIndex;
- /** @type {?} */
- BoundTextAst.prototype.sourceSpan;
-}
-/**
- * A plain attribute on an element.
- */
-var AttrAst = (function () {
- /**
- * @param {?} name
- * @param {?} value
- * @param {?} sourceSpan
- */
- function AttrAst(name, value, sourceSpan) {
- this.name = name;
- this.value = value;
- this.sourceSpan = sourceSpan;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- AttrAst.prototype.visit = function (visitor, context) { return visitor.visitAttr(this, context); };
- return AttrAst;
-}());
-function AttrAst_tsickle_Closure_declarations() {
- /** @type {?} */
- AttrAst.prototype.name;
- /** @type {?} */
- AttrAst.prototype.value;
- /** @type {?} */
- AttrAst.prototype.sourceSpan;
-}
-/**
- * A binding for an element property (e.g. `[property]="expression"`) or an animation trigger (e.g.
- * `[\@trigger]="stateExp"`)
- */
-var BoundElementPropertyAst = (function () {
- /**
- * @param {?} name
- * @param {?} type
- * @param {?} securityContext
- * @param {?} needsRuntimeSecurityContext
- * @param {?} value
- * @param {?} unit
- * @param {?} sourceSpan
- */
- function BoundElementPropertyAst(name, type, securityContext, needsRuntimeSecurityContext, value, unit, sourceSpan) {
- this.name = name;
- this.type = type;
- this.securityContext = securityContext;
- this.needsRuntimeSecurityContext = needsRuntimeSecurityContext;
- this.value = value;
- this.unit = unit;
- this.sourceSpan = sourceSpan;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- BoundElementPropertyAst.prototype.visit = function (visitor, context) {
- return visitor.visitElementProperty(this, context);
- };
- Object.defineProperty(BoundElementPropertyAst.prototype, "isAnimation", {
- /**
- * @return {?}
- */
- get: function () { return this.type === PropertyBindingType.Animation; },
- enumerable: true,
- configurable: true
- });
- return BoundElementPropertyAst;
-}());
-function BoundElementPropertyAst_tsickle_Closure_declarations() {
- /** @type {?} */
- BoundElementPropertyAst.prototype.name;
- /** @type {?} */
- BoundElementPropertyAst.prototype.type;
- /** @type {?} */
- BoundElementPropertyAst.prototype.securityContext;
- /** @type {?} */
- BoundElementPropertyAst.prototype.needsRuntimeSecurityContext;
- /** @type {?} */
- BoundElementPropertyAst.prototype.value;
- /** @type {?} */
- BoundElementPropertyAst.prototype.unit;
- /** @type {?} */
- BoundElementPropertyAst.prototype.sourceSpan;
-}
-/**
- * A binding for an element event (e.g. `(event)="handler()"`) or an animation trigger event (e.g.
- * `(\@trigger.phase)="callback($event)"`).
- */
-var BoundEventAst = (function () {
- /**
- * @param {?} name
- * @param {?} target
- * @param {?} phase
- * @param {?} handler
- * @param {?} sourceSpan
- */
- function BoundEventAst(name, target, phase, handler, sourceSpan) {
- this.name = name;
- this.target = target;
- this.phase = phase;
- this.handler = handler;
- this.sourceSpan = sourceSpan;
- }
- /**
- * @param {?} name
- * @param {?} target
- * @param {?} phase
- * @return {?}
- */
- BoundEventAst.calcFullName = function (name, target, phase) {
- if (target) {
- return target + ":" + name;
- }
- else if (phase) {
- return "@" + name + "." + phase;
- }
- else {
- return name;
- }
- };
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- BoundEventAst.prototype.visit = function (visitor, context) {
- return visitor.visitEvent(this, context);
- };
- Object.defineProperty(BoundEventAst.prototype, "fullName", {
- /**
- * @return {?}
- */
- get: function () { return BoundEventAst.calcFullName(this.name, this.target, this.phase); },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(BoundEventAst.prototype, "isAnimation", {
- /**
- * @return {?}
- */
- get: function () { return !!this.phase; },
- enumerable: true,
- configurable: true
- });
- return BoundEventAst;
-}());
-function BoundEventAst_tsickle_Closure_declarations() {
- /** @type {?} */
- BoundEventAst.prototype.name;
- /** @type {?} */
- BoundEventAst.prototype.target;
- /** @type {?} */
- BoundEventAst.prototype.phase;
- /** @type {?} */
- BoundEventAst.prototype.handler;
- /** @type {?} */
- BoundEventAst.prototype.sourceSpan;
-}
-/**
- * A reference declaration on an element (e.g. `let someName="expression"`).
- */
-var ReferenceAst = (function () {
- /**
- * @param {?} name
- * @param {?} value
- * @param {?} sourceSpan
- */
- function ReferenceAst(name, value, sourceSpan) {
- this.name = name;
- this.value = value;
- this.sourceSpan = sourceSpan;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- ReferenceAst.prototype.visit = function (visitor, context) {
- return visitor.visitReference(this, context);
- };
- return ReferenceAst;
-}());
-function ReferenceAst_tsickle_Closure_declarations() {
- /** @type {?} */
- ReferenceAst.prototype.name;
- /** @type {?} */
- ReferenceAst.prototype.value;
- /** @type {?} */
- ReferenceAst.prototype.sourceSpan;
-}
-/**
- * A variable declaration on a (e.g. `var-someName="someLocalName"`).
- */
-var VariableAst = (function () {
- /**
- * @param {?} name
- * @param {?} value
- * @param {?} sourceSpan
- */
- function VariableAst(name, value, sourceSpan) {
- this.name = name;
- this.value = value;
- this.sourceSpan = sourceSpan;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- VariableAst.prototype.visit = function (visitor, context) {
- return visitor.visitVariable(this, context);
- };
- return VariableAst;
-}());
-function VariableAst_tsickle_Closure_declarations() {
- /** @type {?} */
- VariableAst.prototype.name;
- /** @type {?} */
- VariableAst.prototype.value;
- /** @type {?} */
- VariableAst.prototype.sourceSpan;
-}
-/**
- * An element declaration in a template.
- */
-var ElementAst = (function () {
- /**
- * @param {?} name
- * @param {?} attrs
- * @param {?} inputs
- * @param {?} outputs
- * @param {?} references
- * @param {?} directives
- * @param {?} providers
- * @param {?} hasViewContainer
- * @param {?} children
- * @param {?} ngContentIndex
- * @param {?} sourceSpan
- * @param {?} endSourceSpan
- */
- function ElementAst(name, attrs, inputs, outputs, references, directives, providers, hasViewContainer, children, ngContentIndex, sourceSpan, endSourceSpan) {
- this.name = name;
- this.attrs = attrs;
- this.inputs = inputs;
- this.outputs = outputs;
- this.references = references;
- this.directives = directives;
- this.providers = providers;
- this.hasViewContainer = hasViewContainer;
- this.children = children;
- this.ngContentIndex = ngContentIndex;
- this.sourceSpan = sourceSpan;
- this.endSourceSpan = endSourceSpan;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- ElementAst.prototype.visit = function (visitor, context) {
- return visitor.visitElement(this, context);
- };
- return ElementAst;
-}());
-function ElementAst_tsickle_Closure_declarations() {
- /** @type {?} */
- ElementAst.prototype.name;
- /** @type {?} */
- ElementAst.prototype.attrs;
- /** @type {?} */
- ElementAst.prototype.inputs;
- /** @type {?} */
- ElementAst.prototype.outputs;
- /** @type {?} */
- ElementAst.prototype.references;
- /** @type {?} */
- ElementAst.prototype.directives;
- /** @type {?} */
- ElementAst.prototype.providers;
- /** @type {?} */
- ElementAst.prototype.hasViewContainer;
- /** @type {?} */
- ElementAst.prototype.children;
- /** @type {?} */
- ElementAst.prototype.ngContentIndex;
- /** @type {?} */
- ElementAst.prototype.sourceSpan;
- /** @type {?} */
- ElementAst.prototype.endSourceSpan;
-}
-/**
- * A `` element included in an Angular template.
- */
-var EmbeddedTemplateAst = (function () {
- /**
- * @param {?} attrs
- * @param {?} outputs
- * @param {?} references
- * @param {?} variables
- * @param {?} directives
- * @param {?} providers
- * @param {?} hasViewContainer
- * @param {?} children
- * @param {?} ngContentIndex
- * @param {?} sourceSpan
- */
- function EmbeddedTemplateAst(attrs, outputs, references, variables, directives, providers, hasViewContainer, children, ngContentIndex, sourceSpan) {
- this.attrs = attrs;
- this.outputs = outputs;
- this.references = references;
- this.variables = variables;
- this.directives = directives;
- this.providers = providers;
- this.hasViewContainer = hasViewContainer;
- this.children = children;
- this.ngContentIndex = ngContentIndex;
- this.sourceSpan = sourceSpan;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- EmbeddedTemplateAst.prototype.visit = function (visitor, context) {
- return visitor.visitEmbeddedTemplate(this, context);
- };
- return EmbeddedTemplateAst;
-}());
-function EmbeddedTemplateAst_tsickle_Closure_declarations() {
- /** @type {?} */
- EmbeddedTemplateAst.prototype.attrs;
- /** @type {?} */
- EmbeddedTemplateAst.prototype.outputs;
- /** @type {?} */
- EmbeddedTemplateAst.prototype.references;
- /** @type {?} */
- EmbeddedTemplateAst.prototype.variables;
- /** @type {?} */
- EmbeddedTemplateAst.prototype.directives;
- /** @type {?} */
- EmbeddedTemplateAst.prototype.providers;
- /** @type {?} */
- EmbeddedTemplateAst.prototype.hasViewContainer;
- /** @type {?} */
- EmbeddedTemplateAst.prototype.children;
- /** @type {?} */
- EmbeddedTemplateAst.prototype.ngContentIndex;
- /** @type {?} */
- EmbeddedTemplateAst.prototype.sourceSpan;
-}
-/**
- * A directive property with a bound value (e.g. `*ngIf="condition").
- */
-var BoundDirectivePropertyAst = (function () {
- /**
- * @param {?} directiveName
- * @param {?} templateName
- * @param {?} value
- * @param {?} sourceSpan
- */
- function BoundDirectivePropertyAst(directiveName, templateName, value, sourceSpan) {
- this.directiveName = directiveName;
- this.templateName = templateName;
- this.value = value;
- this.sourceSpan = sourceSpan;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- BoundDirectivePropertyAst.prototype.visit = function (visitor, context) {
- return visitor.visitDirectiveProperty(this, context);
- };
- return BoundDirectivePropertyAst;
-}());
-function BoundDirectivePropertyAst_tsickle_Closure_declarations() {
- /** @type {?} */
- BoundDirectivePropertyAst.prototype.directiveName;
- /** @type {?} */
- BoundDirectivePropertyAst.prototype.templateName;
- /** @type {?} */
- BoundDirectivePropertyAst.prototype.value;
- /** @type {?} */
- BoundDirectivePropertyAst.prototype.sourceSpan;
-}
-/**
- * A directive declared on an element.
- */
-var DirectiveAst = (function () {
- /**
- * @param {?} directive
- * @param {?} inputs
- * @param {?} hostProperties
- * @param {?} hostEvents
- * @param {?} sourceSpan
- */
- function DirectiveAst(directive, inputs, hostProperties, hostEvents, sourceSpan) {
- this.directive = directive;
- this.inputs = inputs;
- this.hostProperties = hostProperties;
- this.hostEvents = hostEvents;
- this.sourceSpan = sourceSpan;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- DirectiveAst.prototype.visit = function (visitor, context) {
- return visitor.visitDirective(this, context);
- };
- return DirectiveAst;
-}());
-function DirectiveAst_tsickle_Closure_declarations() {
- /** @type {?} */
- DirectiveAst.prototype.directive;
- /** @type {?} */
- DirectiveAst.prototype.inputs;
- /** @type {?} */
- DirectiveAst.prototype.hostProperties;
- /** @type {?} */
- DirectiveAst.prototype.hostEvents;
- /** @type {?} */
- DirectiveAst.prototype.sourceSpan;
-}
-/**
- * A provider declared on an element
- */
-var ProviderAst = (function () {
- /**
- * @param {?} token
- * @param {?} multiProvider
- * @param {?} eager
- * @param {?} providers
- * @param {?} providerType
- * @param {?} lifecycleHooks
- * @param {?} sourceSpan
- */
- function ProviderAst(token, multiProvider, eager, providers, providerType, lifecycleHooks, sourceSpan) {
- this.token = token;
- this.multiProvider = multiProvider;
- this.eager = eager;
- this.providers = providers;
- this.providerType = providerType;
- this.lifecycleHooks = lifecycleHooks;
- this.sourceSpan = sourceSpan;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- ProviderAst.prototype.visit = function (visitor, context) {
- // No visit method in the visitor for now...
- return null;
- };
- return ProviderAst;
-}());
-function ProviderAst_tsickle_Closure_declarations() {
- /** @type {?} */
- ProviderAst.prototype.token;
- /** @type {?} */
- ProviderAst.prototype.multiProvider;
- /** @type {?} */
- ProviderAst.prototype.eager;
- /** @type {?} */
- ProviderAst.prototype.providers;
- /** @type {?} */
- ProviderAst.prototype.providerType;
- /** @type {?} */
- ProviderAst.prototype.lifecycleHooks;
- /** @type {?} */
- ProviderAst.prototype.sourceSpan;
-}
-var ProviderAstType = {};
-ProviderAstType.PublicService = 0;
-ProviderAstType.PrivateService = 1;
-ProviderAstType.Component = 2;
-ProviderAstType.Directive = 3;
-ProviderAstType.Builtin = 4;
-ProviderAstType[ProviderAstType.PublicService] = "PublicService";
-ProviderAstType[ProviderAstType.PrivateService] = "PrivateService";
-ProviderAstType[ProviderAstType.Component] = "Component";
-ProviderAstType[ProviderAstType.Directive] = "Directive";
-ProviderAstType[ProviderAstType.Builtin] = "Builtin";
-/**
- * Position where content is to be projected (instance of `` in a template).
- */
-var NgContentAst = (function () {
- /**
- * @param {?} index
- * @param {?} ngContentIndex
- * @param {?} sourceSpan
- */
- function NgContentAst(index, ngContentIndex, sourceSpan) {
- this.index = index;
- this.ngContentIndex = ngContentIndex;
- this.sourceSpan = sourceSpan;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- NgContentAst.prototype.visit = function (visitor, context) {
- return visitor.visitNgContent(this, context);
- };
- return NgContentAst;
-}());
-function NgContentAst_tsickle_Closure_declarations() {
- /** @type {?} */
- NgContentAst.prototype.index;
- /** @type {?} */
- NgContentAst.prototype.ngContentIndex;
- /** @type {?} */
- NgContentAst.prototype.sourceSpan;
-}
-var PropertyBindingType = {};
-PropertyBindingType.Property = 0;
-PropertyBindingType.Attribute = 1;
-PropertyBindingType.Class = 2;
-PropertyBindingType.Style = 3;
-PropertyBindingType.Animation = 4;
-PropertyBindingType[PropertyBindingType.Property] = "Property";
-PropertyBindingType[PropertyBindingType.Attribute] = "Attribute";
-PropertyBindingType[PropertyBindingType.Class] = "Class";
-PropertyBindingType[PropertyBindingType.Style] = "Style";
-PropertyBindingType[PropertyBindingType.Animation] = "Animation";
-/**
- * Visit every node in a list of {\@link TemplateAst}s with the given {\@link TemplateAstVisitor}.
- * @param {?} visitor
- * @param {?} asts
- * @param {?=} context
- * @return {?}
- */
-function templateVisitAll(visitor, asts, context) {
- if (context === void 0) { context = null; }
- var /** @type {?} */ result = [];
- var /** @type {?} */ visit = visitor.visit ?
- function (ast) { return visitor.visit(ast, context) || ast.visit(visitor, context); } :
- function (ast) { return ast.visit(visitor, context); };
- asts.forEach(function (ast) {
- var /** @type {?} */ astResult = visit(ast);
- if (astResult) {
- result.push(astResult);
- }
- });
- return result;
-}
-//# sourceMappingURL=template_ast.js.map
-
-/***/ }),
-/* 48 */,
-/* 49 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* WEBPACK VAR INJECTION */(function(global) {/* unused harmony export scheduleMicroTask */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return _global; });
-/* unused harmony export getTypeNameForDebugging */
-/* harmony export (immutable) */ __webpack_exports__["a"] = isPresent;
-/* harmony export (immutable) */ __webpack_exports__["f"] = isBlank;
-/* unused harmony export isStrictStringMap */
-/* harmony export (immutable) */ __webpack_exports__["d"] = stringify;
-/* unused harmony export NumberWrapper */
-/* unused harmony export looseIdentical */
-/* harmony export (immutable) */ __webpack_exports__["b"] = isJsObject;
-/* unused harmony export print */
-/* unused harmony export warn */
-/* harmony export (immutable) */ __webpack_exports__["g"] = setValueOnPath;
-/* harmony export (immutable) */ __webpack_exports__["c"] = getSymbolIterator;
-/* unused harmony export isPrimitive */
-/* unused harmony export escapeRegExp */
-/**
- * @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 /** @type {?} */ globalScope;
-if (typeof window === 'undefined') {
- if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) {
- // TODO: Replace any with WorkerGlobalScope from lib.webworker.d.ts #3492
- globalScope = (self);
- }
- else {
- globalScope = (global);
- }
-}
-else {
- globalScope = (window);
-}
-/**
- * @param {?} fn
- * @return {?}
- */
-function scheduleMicroTask(fn) {
- Zone.current.scheduleMicroTask('scheduleMicrotask', fn);
-}
-// Need to declare a new variable for global here since TypeScript
-// exports the original value of the symbol.
-var /** @type {?} */ _global = globalScope;
-
-/**
- * @param {?} type
- * @return {?}
- */
-function getTypeNameForDebugging(type) {
- return type['name'] || typeof type;
-}
-// TODO: remove calls to assert in production environment
-// Note: Can't just export this and import in in other files
-// as `assert` is a reserved keyword in Dart
-_global.assert = function assert(condition) {
- // TODO: to be fixed properly via #2830, noop for now
-};
-/**
- * @param {?} obj
- * @return {?}
- */
-function isPresent(obj) {
- return obj != null;
-}
-/**
- * @param {?} obj
- * @return {?}
- */
-function isBlank(obj) {
- return obj == null;
-}
-var /** @type {?} */ STRING_MAP_PROTO = Object.getPrototypeOf({});
-/**
- * @param {?} obj
- * @return {?}
- */
-function isStrictStringMap(obj) {
- return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;
-}
-/**
- * @param {?} token
- * @return {?}
- */
-function stringify(token) {
- if (typeof token === 'string') {
- return token;
- }
- if (token == null) {
- return '' + token;
- }
- if (token.overriddenName) {
- return "" + token.overriddenName;
- }
- if (token.name) {
- return "" + token.name;
- }
- var /** @type {?} */ res = token.toString();
- var /** @type {?} */ newLineIndex = res.indexOf('\n');
- return newLineIndex === -1 ? res : res.substring(0, newLineIndex);
-}
-var NumberWrapper = (function () {
- function NumberWrapper() {
- }
- /**
- * @param {?} text
- * @return {?}
- */
- NumberWrapper.parseIntAutoRadix = function (text) {
- var /** @type {?} */ result = parseInt(text);
- if (isNaN(result)) {
- throw new Error('Invalid integer literal when parsing ' + text);
- }
- return result;
- };
- /**
- * @param {?} value
- * @return {?}
- */
- NumberWrapper.isNumeric = function (value) { return !isNaN(value - parseFloat(value)); };
- return NumberWrapper;
-}());
-/**
- * @param {?} a
- * @param {?} b
- * @return {?}
- */
-function looseIdentical(a, b) {
- return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);
-}
-/**
- * @param {?} o
- * @return {?}
- */
-function isJsObject(o) {
- return o !== null && (typeof o === 'function' || typeof o === 'object');
-}
-/**
- * @param {?} obj
- * @return {?}
- */
-function print(obj) {
- // tslint:disable-next-line:no-console
- console.log(obj);
-}
-/**
- * @param {?} obj
- * @return {?}
- */
-function warn(obj) {
- console.warn(obj);
-}
-/**
- * @param {?} global
- * @param {?} path
- * @param {?} value
- * @return {?}
- */
-function setValueOnPath(global, path, value) {
- var /** @type {?} */ parts = path.split('.');
- var /** @type {?} */ obj = global;
- while (parts.length > 1) {
- var /** @type {?} */ name_1 = parts.shift();
- if (obj.hasOwnProperty(name_1) && obj[name_1] != null) {
- obj = obj[name_1];
- }
- else {
- obj = obj[name_1] = {};
- }
- }
- if (obj === undefined || obj === null) {
- obj = {};
- }
- obj[parts.shift()] = value;
-}
-var /** @type {?} */ _symbolIterator = null;
-/**
- * @return {?}
- */
-function getSymbolIterator() {
- if (!_symbolIterator) {
- if (((globalScope)).Symbol && Symbol.iterator) {
- _symbolIterator = Symbol.iterator;
- }
- else {
- // es6-shim specific logic
- var /** @type {?} */ keys = Object.getOwnPropertyNames(Map.prototype);
- for (var /** @type {?} */ i = 0; i < keys.length; ++i) {
- var /** @type {?} */ key = keys[i];
- if (key !== 'entries' && key !== 'size' &&
- ((Map)).prototype[key] === Map.prototype['entries']) {
- _symbolIterator = key;
- }
- }
- }
- }
- return _symbolIterator;
-}
-/**
- * @param {?} obj
- * @return {?}
- */
-function isPrimitive(obj) {
- return !isJsObject(obj);
-}
-/**
- * @param {?} s
- * @return {?}
- */
-function escapeRegExp(s) {
- return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
-}
-//# sourceMappingURL=lang.js.map
-/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(53)))
-
-/***/ }),
-/* 50 */,
-/* 51 */
-/***/ (function(module, exports, __webpack_require__) {
-
-__webpack_require__(663);
-module.exports = angular;
-
-
-/***/ }),
-/* 52 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// most Object methods by ES6 should accept primitives
-var $export = __webpack_require__(2)
- , core = __webpack_require__(21)
- , fails = __webpack_require__(11);
-module.exports = function(KEY, exec){
- var fn = (core.Object || {})[KEY] || Object[KEY]
- , exp = {};
- exp[KEY] = exec(fn);
- $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
-};
-
-/***/ }),
-/* 53 */
-/***/ (function(module, exports) {
-
-var g;
-
-// This works in non-strict mode
-g = (function() {
- return this;
-})();
-
-try {
- // This works if eval is allowed (see CSP)
- g = g || Function("return this")() || (1,eval)("this");
-} catch(e) {
- // This works if the window reference is available
- if(typeof window === "object")
- g = window;
-}
-
-// g can still be undefined, but nothing to do about it...
-// We return undefined, instead of nothing here, so it's
-// easier to handle this case. if(!global) { ...}
-
-module.exports = g;
-
-
-/***/ }),
-/* 54 */,
-/* 55 */,
-/* 56 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 0 -> Array#forEach
-// 1 -> Array#map
-// 2 -> Array#filter
-// 3 -> Array#some
-// 4 -> Array#every
-// 5 -> Array#find
-// 6 -> Array#findIndex
-var ctx = __webpack_require__(100)
- , IObject = __webpack_require__(135)
- , toObject = __webpack_require__(43)
- , toLength = __webpack_require__(36)
- , asc = __webpack_require__(688);
-module.exports = function(TYPE, $create){
- var IS_MAP = TYPE == 1
- , IS_FILTER = TYPE == 2
- , IS_SOME = TYPE == 3
- , IS_EVERY = TYPE == 4
- , IS_FIND_INDEX = TYPE == 6
- , NO_HOLES = TYPE == 5 || IS_FIND_INDEX
- , create = $create || asc;
- return function($this, callbackfn, that){
- var O = toObject($this)
- , self = IObject(O)
- , f = ctx(callbackfn, that, 3)
- , length = toLength(self.length)
- , index = 0
- , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined
- , val, res;
- for(;length > index; index++)if(NO_HOLES || index in self){
- val = self[index];
- res = f(val, index, O);
- if(TYPE){
- if(IS_MAP)result[index] = res; // map
- else if(res)switch(TYPE){
- case 3: return true; // some
- case 5: return val; // find
- case 6: return index; // findIndex
- case 2: result.push(val); // filter
- } else if(IS_EVERY)return false; // every
- }
- }
- return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
- };
-};
-
-/***/ }),
-/* 57 */
-/***/ (function(module, exports) {
-
-// 7.2.1 RequireObjectCoercible(argument)
-module.exports = function(it){
- if(it == undefined)throw TypeError("Can't call method on " + it);
- return it;
-};
-
-/***/ }),
-/* 58 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var dP = __webpack_require__(25)
- , createDesc = __webpack_require__(87);
-module.exports = __webpack_require__(29) ? function(object, key, value){
- return dP.f(object, key, createDesc(1, value));
-} : function(object, key, value){
- object[key] = value;
- return object;
-};
-
-/***/ }),
-/* 59 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var Map = __webpack_require__(449)
- , $export = __webpack_require__(2)
- , shared = __webpack_require__(195)('metadata')
- , store = shared.store || (shared.store = new (__webpack_require__(809)));
-
-var getOrCreateMetadataMap = function(target, targetKey, create){
- var targetMetadata = store.get(target);
- if(!targetMetadata){
- if(!create)return undefined;
- store.set(target, targetMetadata = new Map);
- }
- var keyMetadata = targetMetadata.get(targetKey);
- if(!keyMetadata){
- if(!create)return undefined;
- targetMetadata.set(targetKey, keyMetadata = new Map);
- } return keyMetadata;
-};
-var ordinaryHasOwnMetadata = function(MetadataKey, O, P){
- var metadataMap = getOrCreateMetadataMap(O, P, false);
- return metadataMap === undefined ? false : metadataMap.has(MetadataKey);
-};
-var ordinaryGetOwnMetadata = function(MetadataKey, O, P){
- var metadataMap = getOrCreateMetadataMap(O, P, false);
- return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);
-};
-var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){
- getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);
-};
-var ordinaryOwnMetadataKeys = function(target, targetKey){
- var metadataMap = getOrCreateMetadataMap(target, targetKey, false)
- , keys = [];
- if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); });
- return keys;
-};
-var toMetaKey = function(it){
- return it === undefined || typeof it == 'symbol' ? it : String(it);
-};
-var exp = function(O){
- $export($export.S, 'Reflect', O);
-};
-
-module.exports = {
- store: store,
- map: getOrCreateMetadataMap,
- has: ordinaryHasOwnMetadata,
- get: ordinaryGetOwnMetadata,
- set: ordinaryDefineOwnMetadata,
- keys: ordinaryOwnMetadataKeys,
- key: toMetaKey,
- exp: exp
-};
-
-/***/ }),
-/* 60 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
-var has = __webpack_require__(33)
- , toObject = __webpack_require__(43)
- , IE_PROTO = __webpack_require__(295)('IE_PROTO')
- , ObjectProto = Object.prototype;
-
-module.exports = Object.getPrototypeOf || function(O){
- O = toObject(O);
- if(has(O, IE_PROTO))return O[IE_PROTO];
- if(typeof O.constructor == 'function' && O instanceof O.constructor){
- return O.constructor.prototype;
- } return O instanceof Object ? ObjectProto : null;
-};
-
-/***/ }),
-/* 61 */,
-/* 62 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-exports.isArray = Array.isArray || (function (x) { return x && typeof x.length === 'number'; });
-//# sourceMappingURL=isArray.js.map
-
-/***/ }),
-/* 63 */,
-/* 64 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__facade_errors__ = __webpack_require__(533);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__facade_lang__ = __webpack_require__(44);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return InvalidPipeArgumentError; });
-/**
- * @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 = (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 InvalidPipeArgumentError = (function (_super) {
- __extends(InvalidPipeArgumentError, _super);
- /**
- * @param {?} type
- * @param {?} value
- */
- function InvalidPipeArgumentError(type, value) {
- _super.call(this, "Invalid argument '" + value + "' for pipe '" + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["a" /* stringify */])(type) + "'");
- }
- return InvalidPipeArgumentError;
-}(__WEBPACK_IMPORTED_MODULE_0__facade_errors__["a" /* BaseError */]));
-//# sourceMappingURL=invalid_pipe_argument_error.js.map
-
-/***/ }),
-/* 65 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return StaticSymbol; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return StaticSymbolCache; });
-/**
- * A token representing the a reference to a static type.
- *
- * This token is unique for a filePath and name and can be used as a hash table key.
- */
-var StaticSymbol = (function () {
- /**
- * @param {?} filePath
- * @param {?} name
- * @param {?=} members
- */
- function StaticSymbol(filePath, name, members) {
- this.filePath = filePath;
- this.name = name;
- this.members = members;
- }
- return StaticSymbol;
-}());
-function StaticSymbol_tsickle_Closure_declarations() {
- /** @type {?} */
- StaticSymbol.prototype.filePath;
- /** @type {?} */
- StaticSymbol.prototype.name;
- /** @type {?} */
- StaticSymbol.prototype.members;
-}
-/**
- * A cache of static symbol used by the StaticReflector to return the same symbol for the
- * same symbol values.
- */
-var StaticSymbolCache = (function () {
- function StaticSymbolCache() {
- this.cache = new Map();
- }
- /**
- * @param {?} declarationFile
- * @param {?} name
- * @param {?=} members
- * @return {?}
- */
- StaticSymbolCache.prototype.get = function (declarationFile, name, members) {
- members = members || [];
- var /** @type {?} */ memberSuffix = members.length ? "." + members.join('.') : '';
- var /** @type {?} */ key = "\"" + declarationFile + "\"." + name + memberSuffix;
- var /** @type {?} */ result = this.cache.get(key);
- if (!result) {
- result = new StaticSymbol(declarationFile, name, members);
- this.cache.set(key, result);
- }
- return result;
- };
- return StaticSymbolCache;
-}());
-function StaticSymbolCache_tsickle_Closure_declarations() {
- /** @type {?} */
- StaticSymbolCache.prototype.cache;
-}
-//# sourceMappingURL=static_symbol.js.map
-
-/***/ }),
-/* 66 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__identifiers__ = __webpack_require__(19);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CompilerConfig; });
-/* unused harmony export RenderTypes */
-/* unused harmony export DefaultRenderTypes */
-/**
- * @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 CompilerConfig = (function () {
- /**
- * @param {?=} __0
- */
- function CompilerConfig(_a) {
- var _b = _a === void 0 ? {} : _a, _c = _b.renderTypes, renderTypes = _c === void 0 ? new DefaultRenderTypes() : _c, _d = _b.defaultEncapsulation, defaultEncapsulation = _d === void 0 ? __WEBPACK_IMPORTED_MODULE_0__angular_core__["O" /* ViewEncapsulation */].Emulated : _d, genDebugInfo = _b.genDebugInfo, logBindingUpdate = _b.logBindingUpdate, _e = _b.useJit, useJit = _e === void 0 ? true : _e;
- this.renderTypes = renderTypes;
- this.defaultEncapsulation = defaultEncapsulation;
- this._genDebugInfo = genDebugInfo;
- this._logBindingUpdate = logBindingUpdate;
- this.useJit = useJit;
- }
- Object.defineProperty(CompilerConfig.prototype, "genDebugInfo", {
- /**
- * @return {?}
- */
- get: function () {
- return this._genDebugInfo === void 0 ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* isDevMode */])() : this._genDebugInfo;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(CompilerConfig.prototype, "logBindingUpdate", {
- /**
- * @return {?}
- */
- get: function () {
- return this._logBindingUpdate === void 0 ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* isDevMode */])() : this._logBindingUpdate;
- },
- enumerable: true,
- configurable: true
- });
- return CompilerConfig;
-}());
-function CompilerConfig_tsickle_Closure_declarations() {
- /** @type {?} */
- CompilerConfig.prototype.renderTypes;
- /** @type {?} */
- CompilerConfig.prototype.defaultEncapsulation;
- /** @type {?} */
- CompilerConfig.prototype._genDebugInfo;
- /** @type {?} */
- CompilerConfig.prototype._logBindingUpdate;
- /** @type {?} */
- CompilerConfig.prototype.useJit;
-}
-/**
- * Types used for the renderer.
- * Can be replaced to specialize the generated output to a specific renderer
- * to help tree shaking.
- * @abstract
- */
-var RenderTypes = (function () {
- function RenderTypes() {
- }
- /**
- * @abstract
- * @return {?}
- */
- RenderTypes.prototype.renderer = function () { };
- /**
- * @abstract
- * @return {?}
- */
- RenderTypes.prototype.renderText = function () { };
- /**
- * @abstract
- * @return {?}
- */
- RenderTypes.prototype.renderElement = function () { };
- /**
- * @abstract
- * @return {?}
- */
- RenderTypes.prototype.renderComment = function () { };
- /**
- * @abstract
- * @return {?}
- */
- RenderTypes.prototype.renderNode = function () { };
- /**
- * @abstract
- * @return {?}
- */
- RenderTypes.prototype.renderEvent = function () { };
- return RenderTypes;
-}());
-var DefaultRenderTypes = (function () {
- function DefaultRenderTypes() {
- this.renderText = null;
- this.renderElement = null;
- this.renderComment = null;
- this.renderNode = null;
- this.renderEvent = null;
- }
- Object.defineProperty(DefaultRenderTypes.prototype, "renderer", {
- /**
- * @return {?}
- */
- get: function () { return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__identifiers__["a" /* createIdentifier */])(__WEBPACK_IMPORTED_MODULE_1__identifiers__["b" /* Identifiers */].Renderer); },
- enumerable: true,
- configurable: true
- });
- ;
- return DefaultRenderTypes;
-}());
-function DefaultRenderTypes_tsickle_Closure_declarations() {
- /** @type {?} */
- DefaultRenderTypes.prototype.renderText;
- /** @type {?} */
- DefaultRenderTypes.prototype.renderElement;
- /** @type {?} */
- DefaultRenderTypes.prototype.renderComment;
- /** @type {?} */
- DefaultRenderTypes.prototype.renderNode;
- /** @type {?} */
- DefaultRenderTypes.prototype.renderEvent;
-}
-//# sourceMappingURL=config.js.map
-
-/***/ }),
-/* 67 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compile_metadata__ = __webpack_require__(15);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__compiler_util_binding_util__ = __webpack_require__(335);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__compiler_util_expression_converter__ = __webpack_require__(112);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__compiler_util_render_util__ = __webpack_require__(336);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__config__ = __webpack_require__(66);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__expression_parser_parser__ = __webpack_require__(91);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__identifiers__ = __webpack_require__(19);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__injectable__ = __webpack_require__(20);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__ml_parser_interpolation_config__ = __webpack_require__(46);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__output_class_builder__ = __webpack_require__(230);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__output_output_ast__ = __webpack_require__(10);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__parse_util__ = __webpack_require__(38);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__private_import_core__ = __webpack_require__(17);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__schema_element_schema_registry__ = __webpack_require__(69);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__template_parser_binding_parser__ = __webpack_require__(349);
-/* unused harmony export DirectiveWrapperCompileResult */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DirectiveWrapperCompiler; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return DirectiveWrapperExpressions; });
-/**
- * @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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-var __metadata = (this && this.__metadata) || function (k, v) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-var DirectiveWrapperCompileResult = (function () {
- /**
- * @param {?} statements
- * @param {?} dirWrapperClassVar
- */
- function DirectiveWrapperCompileResult(statements, dirWrapperClassVar) {
- this.statements = statements;
- this.dirWrapperClassVar = dirWrapperClassVar;
- }
- return DirectiveWrapperCompileResult;
-}());
-function DirectiveWrapperCompileResult_tsickle_Closure_declarations() {
- /** @type {?} */
- DirectiveWrapperCompileResult.prototype.statements;
- /** @type {?} */
- DirectiveWrapperCompileResult.prototype.dirWrapperClassVar;
-}
-var /** @type {?} */ CONTEXT_FIELD_NAME = 'context';
-var /** @type {?} */ CHANGES_FIELD_NAME = '_changes';
-var /** @type {?} */ CHANGED_FIELD_NAME = '_changed';
-var /** @type {?} */ EVENT_HANDLER_FIELD_NAME = '_eventHandler';
-var /** @type {?} */ CURR_VALUE_VAR = __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["a" /* variable */]('currValue');
-var /** @type {?} */ THROW_ON_CHANGE_VAR = __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["a" /* variable */]('throwOnChange');
-var /** @type {?} */ FORCE_UPDATE_VAR = __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["a" /* variable */]('forceUpdate');
-var /** @type {?} */ VIEW_VAR = __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["a" /* variable */]('view');
-var /** @type {?} */ COMPONENT_VIEW_VAR = __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["a" /* variable */]('componentView');
-var /** @type {?} */ RENDER_EL_VAR = __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["a" /* variable */]('el');
-var /** @type {?} */ EVENT_NAME_VAR = __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["a" /* variable */]('eventName');
-var /** @type {?} */ RESET_CHANGES_STMT = __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(CHANGES_FIELD_NAME).set(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["l" /* literalMap */]([])).toStmt();
-/**
- * We generate directive wrappers to prevent code bloat when a directive is used.
- * A directive wrapper encapsulates
- * the dirty checking for `\@Input`, the handling of `\@HostListener` / `\@HostBinding`
- * and calling the lifecyclehooks `ngOnInit`, `ngOnChanges`, `ngDoCheck`.
- *
- * So far, only `\@Input` and the lifecycle hooks have been implemented.
- */
-var DirectiveWrapperCompiler = (function () {
- /**
- * @param {?} compilerConfig
- * @param {?} _exprParser
- * @param {?} _schemaRegistry
- * @param {?} _console
- */
- function DirectiveWrapperCompiler(compilerConfig, _exprParser, _schemaRegistry, _console) {
- this.compilerConfig = compilerConfig;
- this._exprParser = _exprParser;
- this._schemaRegistry = _schemaRegistry;
- this._console = _console;
- }
- /**
- * @param {?} id
- * @return {?}
- */
- DirectiveWrapperCompiler.dirWrapperClassName = function (id) {
- return "Wrapper_" + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__compile_metadata__["a" /* identifierName */])(id);
- };
- /**
- * @param {?} dirMeta
- * @return {?}
- */
- DirectiveWrapperCompiler.prototype.compile = function (dirMeta) {
- var /** @type {?} */ hostParseResult = parseHostBindings(dirMeta, this._exprParser, this._schemaRegistry);
- reportParseErrors(hostParseResult.errors, this._console);
- var /** @type {?} */ builder = new DirectiveWrapperBuilder(this.compilerConfig, dirMeta);
- Object.keys(dirMeta.inputs).forEach(function (inputFieldName) {
- addCheckInputMethod(inputFieldName, builder);
- });
- addNgDoCheckMethod(builder);
- addCheckHostMethod(hostParseResult.hostProps, hostParseResult.hostListeners, builder);
- addHandleEventMethod(hostParseResult.hostListeners, builder);
- addSubscribeMethod(dirMeta, builder);
- var /** @type {?} */ classStmt = builder.build();
- return new DirectiveWrapperCompileResult([classStmt], classStmt.name);
- };
- DirectiveWrapperCompiler = __decorate([
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__injectable__["a" /* CompilerInjectable */])(),
- __metadata('design:paramtypes', [__WEBPACK_IMPORTED_MODULE_4__config__["a" /* CompilerConfig */], __WEBPACK_IMPORTED_MODULE_5__expression_parser_parser__["a" /* Parser */], __WEBPACK_IMPORTED_MODULE_13__schema_element_schema_registry__["a" /* ElementSchemaRegistry */], __WEBPACK_IMPORTED_MODULE_12__private_import_core__["F" /* Console */]])
- ], DirectiveWrapperCompiler);
- return DirectiveWrapperCompiler;
-}());
-function DirectiveWrapperCompiler_tsickle_Closure_declarations() {
- /** @type {?} */
- DirectiveWrapperCompiler.prototype.compilerConfig;
- /** @type {?} */
- DirectiveWrapperCompiler.prototype._exprParser;
- /** @type {?} */
- DirectiveWrapperCompiler.prototype._schemaRegistry;
- /** @type {?} */
- DirectiveWrapperCompiler.prototype._console;
-}
-var DirectiveWrapperBuilder = (function () {
- /**
- * @param {?} compilerConfig
- * @param {?} dirMeta
- */
- function DirectiveWrapperBuilder(compilerConfig, dirMeta) {
- this.compilerConfig = compilerConfig;
- this.dirMeta = dirMeta;
- this.fields = [];
- this.getters = [];
- this.methods = [];
- this.ctorStmts = [];
- this.detachStmts = [];
- this.destroyStmts = [];
- var dirLifecycleHooks = dirMeta.type.lifecycleHooks;
- this.genChanges = dirLifecycleHooks.indexOf(__WEBPACK_IMPORTED_MODULE_12__private_import_core__["G" /* LifecycleHooks */].OnChanges) !== -1 ||
- this.compilerConfig.logBindingUpdate;
- this.ngOnChanges = dirLifecycleHooks.indexOf(__WEBPACK_IMPORTED_MODULE_12__private_import_core__["G" /* LifecycleHooks */].OnChanges) !== -1;
- this.ngOnInit = dirLifecycleHooks.indexOf(__WEBPACK_IMPORTED_MODULE_12__private_import_core__["G" /* LifecycleHooks */].OnInit) !== -1;
- this.ngDoCheck = dirLifecycleHooks.indexOf(__WEBPACK_IMPORTED_MODULE_12__private_import_core__["G" /* LifecycleHooks */].DoCheck) !== -1;
- this.ngOnDestroy = dirLifecycleHooks.indexOf(__WEBPACK_IMPORTED_MODULE_12__private_import_core__["G" /* LifecycleHooks */].OnDestroy) !== -1;
- if (this.ngOnDestroy) {
- this.destroyStmts.push(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(CONTEXT_FIELD_NAME).callMethod('ngOnDestroy', []).toStmt());
- }
- }
- /**
- * @return {?}
- */
- DirectiveWrapperBuilder.prototype.build = function () {
- var /** @type {?} */ dirDepParamNames = [];
- for (var /** @type {?} */ i = 0; i < this.dirMeta.type.diDeps.length; i++) {
- dirDepParamNames.push("p" + i);
- }
- var /** @type {?} */ methods = [
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["q" /* ClassMethod */]('ngOnDetach', [
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["o" /* FnParam */](VIEW_VAR.name, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["d" /* importType */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__identifiers__["a" /* createIdentifier */])(__WEBPACK_IMPORTED_MODULE_6__identifiers__["b" /* Identifiers */].AppView), [__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["m" /* DYNAMIC_TYPE */]])),
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["o" /* FnParam */](COMPONENT_VIEW_VAR.name, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["d" /* importType */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__identifiers__["a" /* createIdentifier */])(__WEBPACK_IMPORTED_MODULE_6__identifiers__["b" /* Identifiers */].AppView), [__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["m" /* DYNAMIC_TYPE */]])),
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["o" /* FnParam */](RENDER_EL_VAR.name, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["m" /* DYNAMIC_TYPE */]),
- ], this.detachStmts),
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["q" /* ClassMethod */]('ngOnDestroy', [], this.destroyStmts),
- ];
- var /** @type {?} */ fields = [
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["c" /* ClassField */](EVENT_HANDLER_FIELD_NAME, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["M" /* FUNCTION_TYPE */], [__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["k" /* StmtModifier */].Private]),
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["c" /* ClassField */](CONTEXT_FIELD_NAME, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["d" /* importType */](this.dirMeta.type)),
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["c" /* ClassField */](CHANGED_FIELD_NAME, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["s" /* BOOL_TYPE */], [__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["k" /* StmtModifier */].Private]),
- ];
- var /** @type {?} */ ctorStmts = [__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(CHANGED_FIELD_NAME).set(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["f" /* literal */](false)).toStmt()];
- if (this.genChanges) {
- fields.push(new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["c" /* ClassField */](CHANGES_FIELD_NAME, new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["n" /* MapType */](__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["m" /* DYNAMIC_TYPE */]), [__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["k" /* StmtModifier */].Private]));
- ctorStmts.push(RESET_CHANGES_STMT);
- }
- ctorStmts.push(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(CONTEXT_FIELD_NAME)
- .set(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["g" /* importExpr */](this.dirMeta.type)
- .instantiate(dirDepParamNames.map(function (paramName) { return __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["a" /* variable */](paramName); })))
- .toStmt());
- return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__output_class_builder__["a" /* createClassStmt */])({
- name: DirectiveWrapperCompiler.dirWrapperClassName(this.dirMeta.type),
- ctorParams: dirDepParamNames.map(function (paramName) { return new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["o" /* FnParam */](paramName, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["m" /* DYNAMIC_TYPE */]); }),
- builders: [{ fields: fields, ctorStmts: ctorStmts, methods: methods }, this]
- });
- };
- return DirectiveWrapperBuilder;
-}());
-function DirectiveWrapperBuilder_tsickle_Closure_declarations() {
- /** @type {?} */
- DirectiveWrapperBuilder.prototype.fields;
- /** @type {?} */
- DirectiveWrapperBuilder.prototype.getters;
- /** @type {?} */
- DirectiveWrapperBuilder.prototype.methods;
- /** @type {?} */
- DirectiveWrapperBuilder.prototype.ctorStmts;
- /** @type {?} */
- DirectiveWrapperBuilder.prototype.detachStmts;
- /** @type {?} */
- DirectiveWrapperBuilder.prototype.destroyStmts;
- /** @type {?} */
- DirectiveWrapperBuilder.prototype.genChanges;
- /** @type {?} */
- DirectiveWrapperBuilder.prototype.ngOnChanges;
- /** @type {?} */
- DirectiveWrapperBuilder.prototype.ngOnInit;
- /** @type {?} */
- DirectiveWrapperBuilder.prototype.ngDoCheck;
- /** @type {?} */
- DirectiveWrapperBuilder.prototype.ngOnDestroy;
- /** @type {?} */
- DirectiveWrapperBuilder.prototype.compilerConfig;
- /** @type {?} */
- DirectiveWrapperBuilder.prototype.dirMeta;
-}
-/**
- * @param {?} builder
- * @return {?}
- */
-function addNgDoCheckMethod(builder) {
- var /** @type {?} */ changedVar = __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["a" /* variable */]('changed');
- var /** @type {?} */ stmts = [
- changedVar.set(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(CHANGED_FIELD_NAME)).toDeclStmt(),
- __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(CHANGED_FIELD_NAME).set(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["f" /* literal */](false)).toStmt(),
- ];
- var /** @type {?} */ lifecycleStmts = [];
- if (builder.genChanges) {
- var /** @type {?} */ onChangesStmts = [];
- if (builder.ngOnChanges) {
- onChangesStmts.push(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(CONTEXT_FIELD_NAME)
- .callMethod('ngOnChanges', [__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(CHANGES_FIELD_NAME)])
- .toStmt());
- }
- if (builder.compilerConfig.logBindingUpdate) {
- onChangesStmts.push(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["g" /* importExpr */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__identifiers__["a" /* createIdentifier */])(__WEBPACK_IMPORTED_MODULE_6__identifiers__["b" /* Identifiers */].setBindingDebugInfoForChanges))
- .callFn([VIEW_VAR.prop('renderer'), RENDER_EL_VAR, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(CHANGES_FIELD_NAME)])
- .toStmt());
- }
- onChangesStmts.push(RESET_CHANGES_STMT);
- lifecycleStmts.push(new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["u" /* IfStmt */](changedVar, onChangesStmts));
- }
- if (builder.ngOnInit) {
- lifecycleStmts.push(new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["u" /* IfStmt */](VIEW_VAR.prop('numberOfChecks').identical(new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["N" /* LiteralExpr */](0)), [__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(CONTEXT_FIELD_NAME).callMethod('ngOnInit', []).toStmt()]));
- }
- if (builder.ngDoCheck) {
- lifecycleStmts.push(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(CONTEXT_FIELD_NAME).callMethod('ngDoCheck', []).toStmt());
- }
- if (lifecycleStmts.length > 0) {
- stmts.push(new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["u" /* IfStmt */](__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["v" /* not */](THROW_ON_CHANGE_VAR), lifecycleStmts));
- }
- stmts.push(new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["t" /* ReturnStatement */](changedVar));
- builder.methods.push(new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["q" /* ClassMethod */]('ngDoCheck', [
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["o" /* FnParam */](VIEW_VAR.name, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["d" /* importType */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__identifiers__["a" /* createIdentifier */])(__WEBPACK_IMPORTED_MODULE_6__identifiers__["b" /* Identifiers */].AppView), [__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["m" /* DYNAMIC_TYPE */]])),
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["o" /* FnParam */](RENDER_EL_VAR.name, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["m" /* DYNAMIC_TYPE */]),
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["o" /* FnParam */](THROW_ON_CHANGE_VAR.name, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["s" /* BOOL_TYPE */]),
- ], stmts, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["s" /* BOOL_TYPE */]));
-}
-/**
- * @param {?} input
- * @param {?} builder
- * @return {?}
- */
-function addCheckInputMethod(input, builder) {
- var /** @type {?} */ field = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__compiler_util_binding_util__["a" /* createCheckBindingField */])(builder);
- var /** @type {?} */ onChangeStatements = [
- __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(CHANGED_FIELD_NAME).set(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["f" /* literal */](true)).toStmt(),
- __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(CONTEXT_FIELD_NAME).prop(input).set(CURR_VALUE_VAR).toStmt(),
- ];
- if (builder.genChanges) {
- onChangeStatements.push(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(CHANGES_FIELD_NAME)
- .key(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["f" /* literal */](input))
- .set(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["g" /* importExpr */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__identifiers__["a" /* createIdentifier */])(__WEBPACK_IMPORTED_MODULE_6__identifiers__["b" /* Identifiers */].SimpleChange))
- .instantiate([field.expression, CURR_VALUE_VAR]))
- .toStmt());
- }
- var /** @type {?} */ methodBody = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__compiler_util_binding_util__["b" /* createCheckBindingStmt */])({ currValExpr: CURR_VALUE_VAR, forceUpdate: FORCE_UPDATE_VAR, stmts: [] }, field.expression, THROW_ON_CHANGE_VAR, onChangeStatements);
- builder.methods.push(new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["q" /* ClassMethod */]("check_" + input, [
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["o" /* FnParam */](CURR_VALUE_VAR.name, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["m" /* DYNAMIC_TYPE */]),
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["o" /* FnParam */](THROW_ON_CHANGE_VAR.name, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["s" /* BOOL_TYPE */]),
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["o" /* FnParam */](FORCE_UPDATE_VAR.name, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["s" /* BOOL_TYPE */]),
- ], methodBody));
-}
-/**
- * @param {?} hostProps
- * @param {?} hostEvents
- * @param {?} builder
- * @return {?}
- */
-function addCheckHostMethod(hostProps, hostEvents, builder) {
- var /** @type {?} */ stmts = [];
- var /** @type {?} */ methodParams = [
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["o" /* FnParam */](VIEW_VAR.name, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["d" /* importType */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__identifiers__["a" /* createIdentifier */])(__WEBPACK_IMPORTED_MODULE_6__identifiers__["b" /* Identifiers */].AppView), [__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["m" /* DYNAMIC_TYPE */]])),
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["o" /* FnParam */](COMPONENT_VIEW_VAR.name, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["d" /* importType */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__identifiers__["a" /* createIdentifier */])(__WEBPACK_IMPORTED_MODULE_6__identifiers__["b" /* Identifiers */].AppView), [__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["m" /* DYNAMIC_TYPE */]])),
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["o" /* FnParam */](RENDER_EL_VAR.name, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["m" /* DYNAMIC_TYPE */]),
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["o" /* FnParam */](THROW_ON_CHANGE_VAR.name, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["s" /* BOOL_TYPE */]),
- ];
- hostProps.forEach(function (hostProp, hostPropIdx) {
- var /** @type {?} */ field = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__compiler_util_binding_util__["a" /* createCheckBindingField */])(builder);
- var /** @type {?} */ evalResult = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__compiler_util_expression_converter__["b" /* convertPropertyBinding */])(builder, null, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(CONTEXT_FIELD_NAME), hostProp.value, field.bindingId);
- if (!evalResult) {
- return;
- }
- var /** @type {?} */ securityContextExpr;
- if (hostProp.needsRuntimeSecurityContext) {
- securityContextExpr = __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["a" /* variable */]("secCtx_" + methodParams.length);
- methodParams.push(new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["o" /* FnParam */](securityContextExpr.name, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["d" /* importType */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__identifiers__["a" /* createIdentifier */])(__WEBPACK_IMPORTED_MODULE_6__identifiers__["b" /* Identifiers */].SecurityContext))));
- }
- var /** @type {?} */ checkBindingStmts;
- if (hostProp.isAnimation) {
- var _a = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__compiler_util_render_util__["a" /* triggerAnimation */])(VIEW_VAR, COMPONENT_VIEW_VAR, hostProp, hostEvents, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(EVENT_HANDLER_FIELD_NAME)
- .or(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["g" /* importExpr */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__identifiers__["a" /* createIdentifier */])(__WEBPACK_IMPORTED_MODULE_6__identifiers__["b" /* Identifiers */].noop))), RENDER_EL_VAR, evalResult.currValExpr, field.expression), updateStmts = _a.updateStmts, detachStmts = _a.detachStmts;
- checkBindingStmts = updateStmts;
- (_b = builder.detachStmts).push.apply(_b, detachStmts);
- }
- else {
- checkBindingStmts = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__compiler_util_render_util__["b" /* writeToRenderer */])(VIEW_VAR, hostProp, RENDER_EL_VAR, evalResult.currValExpr, builder.compilerConfig.logBindingUpdate, securityContextExpr);
- }
- stmts.push.apply(stmts, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__compiler_util_binding_util__["b" /* createCheckBindingStmt */])(evalResult, field.expression, THROW_ON_CHANGE_VAR, checkBindingStmts));
- var _b;
- });
- builder.methods.push(new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["q" /* ClassMethod */]('checkHost', methodParams, stmts));
-}
-/**
- * @param {?} hostListeners
- * @param {?} builder
- * @return {?}
- */
-function addHandleEventMethod(hostListeners, builder) {
- var /** @type {?} */ resultVar = __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["a" /* variable */]("result");
- var /** @type {?} */ actionStmts = [resultVar.set(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["f" /* literal */](true)).toDeclStmt(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["s" /* BOOL_TYPE */])];
- hostListeners.forEach(function (hostListener, eventIdx) {
- var /** @type {?} */ evalResult = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__compiler_util_expression_converter__["c" /* convertActionBinding */])(builder, null, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(CONTEXT_FIELD_NAME), hostListener.handler, "sub_" + eventIdx);
- var /** @type {?} */ trueStmts = evalResult.stmts;
- if (evalResult.preventDefault) {
- trueStmts.push(resultVar.set(evalResult.preventDefault.and(resultVar)).toStmt());
- }
- // TODO(tbosch): convert this into a `switch` once our OutputAst supports it.
- actionStmts.push(new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["u" /* IfStmt */](EVENT_NAME_VAR.equals(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["f" /* literal */](hostListener.fullName)), trueStmts));
- });
- actionStmts.push(new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["t" /* ReturnStatement */](resultVar));
- builder.methods.push(new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["q" /* ClassMethod */]('handleEvent', [
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["o" /* FnParam */](EVENT_NAME_VAR.name, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["r" /* STRING_TYPE */]),
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["o" /* FnParam */](__WEBPACK_IMPORTED_MODULE_2__compiler_util_expression_converter__["d" /* EventHandlerVars */].event.name, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["m" /* DYNAMIC_TYPE */])
- ], actionStmts, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["s" /* BOOL_TYPE */]));
-}
-/**
- * @param {?} dirMeta
- * @param {?} builder
- * @return {?}
- */
-function addSubscribeMethod(dirMeta, builder) {
- var /** @type {?} */ methodParams = [
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["o" /* FnParam */](VIEW_VAR.name, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["d" /* importType */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__identifiers__["a" /* createIdentifier */])(__WEBPACK_IMPORTED_MODULE_6__identifiers__["b" /* Identifiers */].AppView), [__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["m" /* DYNAMIC_TYPE */]])),
- new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["o" /* FnParam */](EVENT_HANDLER_FIELD_NAME, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["m" /* DYNAMIC_TYPE */])
- ];
- var /** @type {?} */ stmts = [
- __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(EVENT_HANDLER_FIELD_NAME).set(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["a" /* variable */](EVENT_HANDLER_FIELD_NAME)).toStmt()
- ];
- Object.keys(dirMeta.outputs).forEach(function (emitterPropName, emitterIdx) {
- var /** @type {?} */ eventName = dirMeta.outputs[emitterPropName];
- var /** @type {?} */ paramName = "emit" + emitterIdx;
- methodParams.push(new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["o" /* FnParam */](paramName, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["s" /* BOOL_TYPE */]));
- var /** @type {?} */ subscriptionFieldName = "subscription" + emitterIdx;
- builder.fields.push(new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["c" /* ClassField */](subscriptionFieldName, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["m" /* DYNAMIC_TYPE */]));
- stmts.push(new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["u" /* IfStmt */](__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["a" /* variable */](paramName), [
- __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(subscriptionFieldName)
- .set(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(CONTEXT_FIELD_NAME)
- .prop(emitterPropName)
- .callMethod(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["O" /* BuiltinMethod */].SubscribeObservable, [__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["a" /* variable */](EVENT_HANDLER_FIELD_NAME)
- .callMethod(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["O" /* BuiltinMethod */].Bind, [VIEW_VAR, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["f" /* literal */](eventName)])]))
- .toStmt()
- ]));
- builder.destroyStmts.push(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(subscriptionFieldName)
- .and(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["e" /* THIS_EXPR */].prop(subscriptionFieldName).callMethod('unsubscribe', []))
- .toStmt());
- });
- builder.methods.push(new __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["q" /* ClassMethod */]('subscribe', methodParams, stmts));
-}
-var ParseResult = (function () {
- /**
- * @param {?} hostProps
- * @param {?} hostListeners
- * @param {?} errors
- */
- function ParseResult(hostProps, hostListeners, errors) {
- this.hostProps = hostProps;
- this.hostListeners = hostListeners;
- this.errors = errors;
- }
- return ParseResult;
-}());
-function ParseResult_tsickle_Closure_declarations() {
- /** @type {?} */
- ParseResult.prototype.hostProps;
- /** @type {?} */
- ParseResult.prototype.hostListeners;
- /** @type {?} */
- ParseResult.prototype.errors;
-}
-/**
- * @param {?} dirMeta
- * @param {?} exprParser
- * @param {?} schemaRegistry
- * @return {?}
- */
-function parseHostBindings(dirMeta, exprParser, schemaRegistry) {
- var /** @type {?} */ errors = [];
- var /** @type {?} */ parser = new __WEBPACK_IMPORTED_MODULE_14__template_parser_binding_parser__["a" /* BindingParser */](exprParser, __WEBPACK_IMPORTED_MODULE_8__ml_parser_interpolation_config__["a" /* DEFAULT_INTERPOLATION_CONFIG */], schemaRegistry, [], errors);
- var /** @type {?} */ moduleUrl = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__compile_metadata__["i" /* identifierModuleUrl */])(dirMeta.type);
- var /** @type {?} */ sourceFileName = moduleUrl ?
- "in Directive " + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__compile_metadata__["a" /* identifierName */])(dirMeta.type) + " in " + moduleUrl :
- "in Directive " + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__compile_metadata__["a" /* identifierName */])(dirMeta.type);
- var /** @type {?} */ sourceFile = new __WEBPACK_IMPORTED_MODULE_11__parse_util__["b" /* ParseSourceFile */]('', sourceFileName);
- var /** @type {?} */ sourceSpan = new __WEBPACK_IMPORTED_MODULE_11__parse_util__["c" /* ParseSourceSpan */](new __WEBPACK_IMPORTED_MODULE_11__parse_util__["d" /* ParseLocation */](sourceFile, null, null, null), new __WEBPACK_IMPORTED_MODULE_11__parse_util__["d" /* ParseLocation */](sourceFile, null, null, null));
- var /** @type {?} */ parsedHostProps = parser.createDirectiveHostPropertyAsts(dirMeta.toSummary(), sourceSpan);
- var /** @type {?} */ parsedHostListeners = parser.createDirectiveHostEventAsts(dirMeta.toSummary(), sourceSpan);
- return new ParseResult(parsedHostProps, parsedHostListeners, errors);
-}
-/**
- * @param {?} parseErrors
- * @param {?} console
- * @return {?}
- */
-function reportParseErrors(parseErrors, console) {
- var /** @type {?} */ warnings = parseErrors.filter(function (error) { return error.level === __WEBPACK_IMPORTED_MODULE_11__parse_util__["e" /* ParseErrorLevel */].WARNING; });
- var /** @type {?} */ errors = parseErrors.filter(function (error) { return error.level === __WEBPACK_IMPORTED_MODULE_11__parse_util__["e" /* ParseErrorLevel */].FATAL; });
- if (warnings.length > 0) {
- this._console.warn("Directive parse warnings:\n" + warnings.join('\n'));
- }
- if (errors.length > 0) {
- throw new Error("Directive parse errors:\n" + errors.join('\n'));
- }
-}
-var DirectiveWrapperExpressions = (function () {
- function DirectiveWrapperExpressions() {
- }
- /**
- * @param {?} dir
- * @param {?} depsExpr
- * @return {?}
- */
- DirectiveWrapperExpressions.create = function (dir, depsExpr) {
- return __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["g" /* importExpr */](dir).instantiate(depsExpr, __WEBPACK_IMPORTED_MODULE_10__output_output_ast__["d" /* importType */](dir));
- };
- /**
- * @param {?} dirWrapper
- * @return {?}
- */
- DirectiveWrapperExpressions.context = function (dirWrapper) {
- return dirWrapper.prop(CONTEXT_FIELD_NAME);
- };
- /**
- * @param {?} dirWrapper
- * @param {?} view
- * @param {?} renderElement
- * @param {?} throwOnChange
- * @return {?}
- */
- DirectiveWrapperExpressions.ngDoCheck = function (dirWrapper, view, renderElement, throwOnChange) {
- return dirWrapper.callMethod('ngDoCheck', [view, renderElement, throwOnChange]);
- };
- /**
- * @param {?} hostProps
- * @param {?} dirWrapper
- * @param {?} view
- * @param {?} componentView
- * @param {?} renderElement
- * @param {?} throwOnChange
- * @param {?} runtimeSecurityContexts
- * @return {?}
- */
- DirectiveWrapperExpressions.checkHost = function (hostProps, dirWrapper, view, componentView, renderElement, throwOnChange, runtimeSecurityContexts) {
- if (hostProps.length) {
- return [dirWrapper
- .callMethod('checkHost', [view, componentView, renderElement, throwOnChange].concat(runtimeSecurityContexts))
- .toStmt()];
- }
- else {
- return [];
- }
- };
- /**
- * @param {?} hostProps
- * @param {?} dirWrapper
- * @param {?} view
- * @param {?} componentView
- * @param {?} renderEl
- * @return {?}
- */
- DirectiveWrapperExpressions.ngOnDetach = function (hostProps, dirWrapper, view, componentView, renderEl) {
- if (hostProps.some(function (prop) { return prop.isAnimation; })) {
- return [dirWrapper
- .callMethod('ngOnDetach', [
- view,
- componentView,
- renderEl,
- ])
- .toStmt()];
- }
- else {
- return [];
- }
- };
- /**
- * @param {?} dir
- * @param {?} dirWrapper
- * @return {?}
- */
- DirectiveWrapperExpressions.ngOnDestroy = function (dir, dirWrapper) {
- if (dir.type.lifecycleHooks.indexOf(__WEBPACK_IMPORTED_MODULE_12__private_import_core__["G" /* LifecycleHooks */].OnDestroy) !== -1 ||
- Object.keys(dir.outputs).length > 0) {
- return [dirWrapper.callMethod('ngOnDestroy', []).toStmt()];
- }
- else {
- return [];
- }
- };
- /**
- * @param {?} dirMeta
- * @param {?} hostProps
- * @param {?} usedEvents
- * @param {?} dirWrapper
- * @param {?} view
- * @param {?} eventListener
- * @return {?}
- */
- DirectiveWrapperExpressions.subscribe = function (dirMeta, hostProps, usedEvents, dirWrapper, view, eventListener) {
- var /** @type {?} */ needsSubscribe = false;
- var /** @type {?} */ eventFlags = [];
- Object.keys(dirMeta.outputs).forEach(function (propName) {
- var /** @type {?} */ eventName = dirMeta.outputs[propName];
- var /** @type {?} */ eventUsed = usedEvents.indexOf(eventName) > -1;
- needsSubscribe = needsSubscribe || eventUsed;
- eventFlags.push(__WEBPACK_IMPORTED_MODULE_10__output_output_ast__["f" /* literal */](eventUsed));
- });
- hostProps.forEach(function (hostProp) {
- if (hostProp.isAnimation && usedEvents.length > 0) {
- needsSubscribe = true;
- }
- });
- if (needsSubscribe) {
- return [
- dirWrapper.callMethod('subscribe', [view, eventListener].concat(eventFlags)).toStmt()
- ];
- }
- else {
- return [];
- }
- };
- /**
- * @param {?} hostEvents
- * @param {?} dirWrapper
- * @param {?} eventName
- * @param {?} event
- * @return {?}
- */
- DirectiveWrapperExpressions.handleEvent = function (hostEvents, dirWrapper, eventName, event) {
- return dirWrapper.callMethod('handleEvent', [eventName, event]);
- };
- return DirectiveWrapperExpressions;
-}());
-//# sourceMappingURL=directive_wrapper_compiler.js.map
-
-/***/ }),
-/* 68 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return Text; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Expansion; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ExpansionCase; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return Attribute; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return Element; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Comment; });
-/* harmony export (immutable) */ __webpack_exports__["g"] = visitAll;
-/**
- * @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 Text = (function () {
- /**
- * @param {?} value
- * @param {?} sourceSpan
- */
- function Text(value, sourceSpan) {
- this.value = value;
- this.sourceSpan = sourceSpan;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- Text.prototype.visit = function (visitor, context) { return visitor.visitText(this, context); };
- return Text;
-}());
-function Text_tsickle_Closure_declarations() {
- /** @type {?} */
- Text.prototype.value;
- /** @type {?} */
- Text.prototype.sourceSpan;
-}
-var Expansion = (function () {
- /**
- * @param {?} switchValue
- * @param {?} type
- * @param {?} cases
- * @param {?} sourceSpan
- * @param {?} switchValueSourceSpan
- */
- function Expansion(switchValue, type, cases, sourceSpan, switchValueSourceSpan) {
- this.switchValue = switchValue;
- this.type = type;
- this.cases = cases;
- this.sourceSpan = sourceSpan;
- this.switchValueSourceSpan = switchValueSourceSpan;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- Expansion.prototype.visit = function (visitor, context) { return visitor.visitExpansion(this, context); };
- return Expansion;
-}());
-function Expansion_tsickle_Closure_declarations() {
- /** @type {?} */
- Expansion.prototype.switchValue;
- /** @type {?} */
- Expansion.prototype.type;
- /** @type {?} */
- Expansion.prototype.cases;
- /** @type {?} */
- Expansion.prototype.sourceSpan;
- /** @type {?} */
- Expansion.prototype.switchValueSourceSpan;
-}
-var ExpansionCase = (function () {
- /**
- * @param {?} value
- * @param {?} expression
- * @param {?} sourceSpan
- * @param {?} valueSourceSpan
- * @param {?} expSourceSpan
- */
- function ExpansionCase(value, expression, sourceSpan, valueSourceSpan, expSourceSpan) {
- this.value = value;
- this.expression = expression;
- this.sourceSpan = sourceSpan;
- this.valueSourceSpan = valueSourceSpan;
- this.expSourceSpan = expSourceSpan;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- ExpansionCase.prototype.visit = function (visitor, context) { return visitor.visitExpansionCase(this, context); };
- return ExpansionCase;
-}());
-function ExpansionCase_tsickle_Closure_declarations() {
- /** @type {?} */
- ExpansionCase.prototype.value;
- /** @type {?} */
- ExpansionCase.prototype.expression;
- /** @type {?} */
- ExpansionCase.prototype.sourceSpan;
- /** @type {?} */
- ExpansionCase.prototype.valueSourceSpan;
- /** @type {?} */
- ExpansionCase.prototype.expSourceSpan;
-}
-var Attribute = (function () {
- /**
- * @param {?} name
- * @param {?} value
- * @param {?} sourceSpan
- * @param {?=} valueSpan
- */
- function Attribute(name, value, sourceSpan, valueSpan) {
- this.name = name;
- this.value = value;
- this.sourceSpan = sourceSpan;
- this.valueSpan = valueSpan;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- Attribute.prototype.visit = function (visitor, context) { return visitor.visitAttribute(this, context); };
- return Attribute;
-}());
-function Attribute_tsickle_Closure_declarations() {
- /** @type {?} */
- Attribute.prototype.name;
- /** @type {?} */
- Attribute.prototype.value;
- /** @type {?} */
- Attribute.prototype.sourceSpan;
- /** @type {?} */
- Attribute.prototype.valueSpan;
-}
-var Element = (function () {
- /**
- * @param {?} name
- * @param {?} attrs
- * @param {?} children
- * @param {?} sourceSpan
- * @param {?} startSourceSpan
- * @param {?} endSourceSpan
- */
- function Element(name, attrs, children, sourceSpan, startSourceSpan, endSourceSpan) {
- this.name = name;
- this.attrs = attrs;
- this.children = children;
- this.sourceSpan = sourceSpan;
- this.startSourceSpan = startSourceSpan;
- this.endSourceSpan = endSourceSpan;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- Element.prototype.visit = function (visitor, context) { return visitor.visitElement(this, context); };
- return Element;
-}());
-function Element_tsickle_Closure_declarations() {
- /** @type {?} */
- Element.prototype.name;
- /** @type {?} */
- Element.prototype.attrs;
- /** @type {?} */
- Element.prototype.children;
- /** @type {?} */
- Element.prototype.sourceSpan;
- /** @type {?} */
- Element.prototype.startSourceSpan;
- /** @type {?} */
- Element.prototype.endSourceSpan;
-}
-var Comment = (function () {
- /**
- * @param {?} value
- * @param {?} sourceSpan
- */
- function Comment(value, sourceSpan) {
- this.value = value;
- this.sourceSpan = sourceSpan;
- }
- /**
- * @param {?} visitor
- * @param {?} context
- * @return {?}
- */
- Comment.prototype.visit = function (visitor, context) { return visitor.visitComment(this, context); };
- return Comment;
-}());
-function Comment_tsickle_Closure_declarations() {
- /** @type {?} */
- Comment.prototype.value;
- /** @type {?} */
- Comment.prototype.sourceSpan;
-}
-/**
- * @param {?} visitor
- * @param {?} nodes
- * @param {?=} context
- * @return {?}
- */
-function visitAll(visitor, nodes, context) {
- if (context === void 0) { context = null; }
- var /** @type {?} */ result = [];
- var /** @type {?} */ visit = visitor.visit ?
- function (ast) { return visitor.visit(ast, context) || ast.visit(visitor, context); } :
- function (ast) { return ast.visit(visitor, context); };
- nodes.forEach(function (ast) {
- var /** @type {?} */ astResult = visit(ast);
- if (astResult) {
- result.push(astResult);
- }
- });
- return result;
-}
-//# sourceMappingURL=ast.js.map
-
-/***/ }),
-/* 69 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ElementSchemaRegistry; });
-/**
- * @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
- */
-/**
- * @abstract
- */
-var ElementSchemaRegistry = (function () {
- function ElementSchemaRegistry() {
- }
- /**
- * @abstract
- * @param {?} tagName
- * @param {?} propName
- * @param {?} schemaMetas
- * @return {?}
- */
- ElementSchemaRegistry.prototype.hasProperty = function (tagName, propName, schemaMetas) { };
- /**
- * @abstract
- * @param {?} tagName
- * @param {?} schemaMetas
- * @return {?}
- */
- ElementSchemaRegistry.prototype.hasElement = function (tagName, schemaMetas) { };
- /**
- * @abstract
- * @param {?} elementName
- * @param {?} propName
- * @param {?} isAttribute
- * @return {?}
- */
- ElementSchemaRegistry.prototype.securityContext = function (elementName, propName, isAttribute) { };
- /**
- * @abstract
- * @return {?}
- */
- ElementSchemaRegistry.prototype.allKnownElementNames = function () { };
- /**
- * @abstract
- * @param {?} propName
- * @return {?}
- */
- ElementSchemaRegistry.prototype.getMappedPropName = function (propName) { };
- /**
- * @abstract
- * @return {?}
- */
- ElementSchemaRegistry.prototype.getDefaultComponentElementName = function () { };
- /**
- * @abstract
- * @param {?} name
- * @return {?}
- */
- ElementSchemaRegistry.prototype.validateProperty = function (name) { };
- /**
- * @abstract
- * @param {?} name
- * @return {?}
- */
- ElementSchemaRegistry.prototype.validateAttribute = function (name) { };
- /**
- * @abstract
- * @param {?} propName
- * @return {?}
- */
- ElementSchemaRegistry.prototype.normalizeAnimationStyleProperty = function (propName) { };
- /**
- * @abstract
- * @param {?} camelCaseProp
- * @param {?} userProvidedProp
- * @param {?} val
- * @return {?}
- */
- ElementSchemaRegistry.prototype.normalizeAnimationStyleValue = function (camelCaseProp, userProvidedProp, val) { };
- return ElementSchemaRegistry;
-}());
-//# sourceMappingURL=element_schema_registry.js.map
-
-/***/ }),
-/* 70 */,
-/* 71 */,
-/* 72 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var META = __webpack_require__(139)('meta')
- , isObject = __webpack_require__(14)
- , has = __webpack_require__(33)
- , setDesc = __webpack_require__(25).f
- , id = 0;
-var isExtensible = Object.isExtensible || function(){
- return true;
-};
-var FREEZE = !__webpack_require__(11)(function(){
- return isExtensible(Object.preventExtensions({}));
-});
-var setMeta = function(it){
- setDesc(it, META, {value: {
- i: 'O' + ++id, // object ID
- w: {} // weak collections IDs
- }});
-};
-var fastKey = function(it, create){
- // return primitive with prefix
- if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
- if(!has(it, META)){
- // can't set metadata to uncaught frozen object
- if(!isExtensible(it))return 'F';
- // not necessary to add metadata
- if(!create)return 'E';
- // add missing metadata
- setMeta(it);
- // return object ID
- } return it[META].i;
-};
-var getWeak = function(it, create){
- if(!has(it, META)){
- // can't set metadata to uncaught frozen object
- if(!isExtensible(it))return true;
- // not necessary to add metadata
- if(!create)return false;
- // add missing metadata
- setMeta(it);
- // return hash weak collections IDs
- } return it[META].w;
-};
-// add metadata on freeze-family methods calling
-var onFreeze = function(it){
- if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);
- return it;
-};
-var meta = module.exports = {
- KEY: META,
- NEED: false,
- fastKey: fastKey,
- getWeak: getWeak,
- onFreeze: onFreeze
-};
-
-/***/ }),
-/* 73 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var pIE = __webpack_require__(193)
- , createDesc = __webpack_require__(87)
- , toIObject = __webpack_require__(42)
- , toPrimitive = __webpack_require__(88)
- , has = __webpack_require__(33)
- , IE8_DOM_DEFINE = __webpack_require__(430)
- , gOPD = Object.getOwnPropertyDescriptor;
-
-exports.f = __webpack_require__(29) ? gOPD : function getOwnPropertyDescriptor(O, P){
- O = toIObject(O);
- P = toPrimitive(P, true);
- if(IE8_DOM_DEFINE)try {
- return gOPD(O, P);
- } catch(e){ /* empty */ }
- if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);
-};
-
-/***/ }),
-/* 74 */,
-/* 75 */,
-/* 76 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/**
- * Functions that manipulate strings
- *
- * Although these functions are exported, they are subject to change without notice.
- *
- * @module common_strings
- */ /** */
-
-var predicates_1 = __webpack_require__(12);
-var rejectFactory_1 = __webpack_require__(149);
-var common_1 = __webpack_require__(8);
-var hof_1 = __webpack_require__(16);
-var transition_1 = __webpack_require__(317);
-var resolvable_1 = __webpack_require__(147);
-/**
- * Returns a string shortened to a maximum length
- *
- * If the string is already less than the `max` length, return the string.
- * Else return the string, shortened to `max - 3` and append three dots ("...").
- *
- * @param max the maximum length of the string to return
- * @param str the input string
- */
-function maxLength(max, str) {
- if (str.length <= max)
- return str;
- return str.substr(0, max - 3) + "...";
-}
-exports.maxLength = maxLength;
-/**
- * Returns a string, with spaces added to the end, up to a desired str length
- *
- * If the string is already longer than the desired length, return the string.
- * Else returns the string, with extra spaces on the end, such that it reaches `length` characters.
- *
- * @param length the desired length of the string to return
- * @param str the input string
- */
-function padString(length, str) {
- while (str.length < length)
- str += " ";
- return str;
-}
-exports.padString = padString;
-function kebobString(camelCase) {
- return camelCase
- .replace(/^([A-Z])/, function ($1) { return $1.toLowerCase(); }) // replace first char
- .replace(/([A-Z])/g, function ($1) { return "-" + $1.toLowerCase(); }); // replace rest
-}
-exports.kebobString = kebobString;
-function _toJson(obj) {
- return JSON.stringify(obj);
-}
-function _fromJson(json) {
- return predicates_1.isString(json) ? JSON.parse(json) : json;
-}
-function promiseToString(p) {
- return "Promise(" + JSON.stringify(p) + ")";
-}
-function functionToString(fn) {
- var fnStr = fnToString(fn);
- var namedFunctionMatch = fnStr.match(/^(function [^ ]+\([^)]*\))/);
- var toStr = namedFunctionMatch ? namedFunctionMatch[1] : fnStr;
- var fnName = fn['name'] || "";
- if (fnName && toStr.match(/function \(/)) {
- return 'function ' + fnName + toStr.substr(9);
- }
- return toStr;
-}
-exports.functionToString = functionToString;
-function fnToString(fn) {
- var _fn = predicates_1.isArray(fn) ? fn.slice(-1)[0] : fn;
- return _fn && _fn.toString() || "undefined";
-}
-exports.fnToString = fnToString;
-var stringifyPatternFn = null;
-var stringifyPattern = function (value) {
- var isTransitionRejectionPromise = rejectFactory_1.Rejection.isTransitionRejectionPromise;
- stringifyPatternFn = stringifyPatternFn || hof_1.pattern([
- [hof_1.not(predicates_1.isDefined), hof_1.val("undefined")],
- [predicates_1.isNull, hof_1.val("null")],
- [predicates_1.isPromise, hof_1.val("[Promise]")],
- [isTransitionRejectionPromise, function (x) { return x._transitionRejection.toString(); }],
- [hof_1.is(rejectFactory_1.Rejection), hof_1.invoke("toString")],
- [hof_1.is(transition_1.Transition), hof_1.invoke("toString")],
- [hof_1.is(resolvable_1.Resolvable), hof_1.invoke("toString")],
- [predicates_1.isInjectable, functionToString],
- [hof_1.val(true), common_1.identity]
- ]);
- return stringifyPatternFn(value);
-};
-function stringify(o) {
- var seen = [];
- function format(val) {
- if (predicates_1.isObject(val)) {
- if (seen.indexOf(val) !== -1)
- return '[circular ref]';
- seen.push(val);
- }
- return stringifyPattern(val);
- }
- return JSON.stringify(o, function (key, val) { return format(val); }).replace(/\\"/g, '"');
-}
-exports.stringify = stringify;
-/** Returns a function that splits a string on a character or substring */
-exports.beforeAfterSubstr = function (char) { return function (str) {
- if (!str)
- return ["", ""];
- var idx = str.indexOf(char);
- if (idx === -1)
- return [str, ""];
- return [str.substr(0, idx), str.substr(idx + 1)];
-}; };
-/**
- * Splits on a delimiter, but returns the delimiters in the array
- *
- * #### Example:
- * ```js
- * var splitOnSlashes = splitOnDelim('/');
- * splitOnSlashes("/foo"); // ["/", "foo"]
- * splitOnSlashes("/foo/"); // ["/", "foo", "/"]
- * ```
- */
-function splitOnDelim(delim) {
- var re = new RegExp("(" + delim + ")", "g");
- return function (str) {
- return str.split(re).filter(common_1.identity);
- };
-}
-exports.splitOnDelim = splitOnDelim;
-;
-/**
- * Reduce fn that joins neighboring strings
- *
- * Given an array of strings, returns a new array
- * where all neighboring strings have been joined.
- *
- * #### Example:
- * ```js
- * let arr = ["foo", "bar", 1, "baz", "", "qux" ];
- * arr.reduce(joinNeighborsR, []) // ["foobar", 1, "bazqux" ]
- * ```
- */
-function joinNeighborsR(acc, x) {
- if (predicates_1.isString(common_1.tail(acc)) && predicates_1.isString(x))
- return acc.slice(0, -1).concat(common_1.tail(acc) + x);
- return common_1.pushR(acc, x);
-}
-exports.joinNeighborsR = joinNeighborsR;
-;
-//# sourceMappingURL=strings.js.map
-
-/***/ }),
-/* 77 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(51);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__);
-/* unused harmony export ContactService */
-
-var ContactService = (function () {
- function ContactService(Contact, $rootScope, $q, toaster) {
- this.page = 1;
- this.hasMore = true;
- this.isLoading = false;
- this.isSaving = false;
- this.isDeleting = false;
- this.selectedPerson = null;
- this.persons = [];
- this.search = null;
- this.sorting = 'name';
- this.ordering = 'ASC';
- this.Contact = Contact;
- this.$rootScope = $rootScope;
- this.$q = $q;
- this.toaster = toaster;
- this.loadContacts();
- this.watchFilters();
- }
- ContactService.prototype.getPerson = function (email) {
- debugger;
- for (var _i = 0, _a = this.persons; _i < _a.length; _i++) {
- var person = _a[_i];
- if (person.email == email) {
- return person;
- }
- }
- };
- ContactService.prototype.doSearch = function () {
- this.hasMore = true;
- this.page = 1;
- this.persons = [];
- this.loadContacts();
- };
- ContactService.prototype.loadContacts = function () {
- var _this = this;
- if (this.hasMore && !this.isLoading) {
- this.isLoading = true;
- var params = {
- '_page': this.page,
- '_sort': this.sorting,
- "_order": this.ordering,
- 'q': this.search
- };
- this.Contact.query(params).then(function (res) {
- console.log(res.data);
- __WEBPACK_IMPORTED_MODULE_0_angular__["forEach"](res.data, function (person) {
- _this.persons.push(person);
- });
- if (!res.data) {
- _this.hasMore = false;
- }
- _this.isLoading = false;
- });
- }
- };
- ;
- ContactService.prototype.loadMore = function () {
- if (this.hasMore && !this.isLoading) {
- this.page += 1;
- this.loadContacts();
- }
- };
- ;
- ContactService.prototype.updateContact = function (person) {
- var _this = this;
- var d = this.$q.defer();
- this.isSaving = true;
- this.Contact.update(person).then(function () {
- _this.isSaving = false;
- _this.toaster.pop('success', 'Updated ' + person.name);
- d.resolve();
- });
- return d.promise;
- };
- ;
- ContactService.prototype.removeContact = function (person) {
- var _this = this;
- var d = this.$q.defer();
- this.isDeleting = true;
- this.Contact.remove(person).then(function () {
- _this.isDeleting = false;
- var index = _this.persons.indexOf(person);
- _this.persons.splice(index, 1);
- _this.selectedPerson = null;
- _this.toaster.pop('success', 'Deleted ' + person.name);
- d.resolve();
- });
- return d.promise;
- };
- ;
- ContactService.prototype.createContact = function (person) {
- var _this = this;
- var d = this.$q.defer();
- this.isSaving = true;
- this.Contact.save(person).then(function () {
- _this.isSaving = false;
- _this.selectedPerson = null;
- _this.hasMore = true;
- _this.page = 1;
- _this.persons = [];
- _this.loadContacts();
- _this.toaster.pop('success', 'Created ' + person.name);
- d.resolve();
- });
- return d.promise;
- };
- ;
- ContactService.prototype.watchFilters = function () {
- var _this = this;
- this.$rootScope.$watch(function () {
- return _this.search + _this.ordering + _this.sorting;
- }, function (newVal) {
- if (__WEBPACK_IMPORTED_MODULE_0_angular__["isDefined"](newVal)) {
- _this.doSearch();
- }
- });
- };
- return ContactService;
-}());
-
-__WEBPACK_IMPORTED_MODULE_0_angular__["module"]('codecraft')
- .service('ContactService', ContactService);
-
-
-/***/ }),
-/* 78 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__lang__ = __webpack_require__(6);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return StringMapWrapper; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ListWrapper; });
-/* unused harmony export isListLikeIterable */
-/* unused harmony export areIterablesEqual */
-/* unused harmony export iterateListLike */
-/**
- * @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
- */
-
-/**
- * Wraps Javascript Objects
- */
-var StringMapWrapper = (function () {
- function StringMapWrapper() {
- }
- /**
- * @param {?} m1
- * @param {?} m2
- * @return {?}
- */
- StringMapWrapper.merge = function (m1, m2) {
- var /** @type {?} */ m = {};
- for (var _i = 0, _a = Object.keys(m1); _i < _a.length; _i++) {
- var k = _a[_i];
- m[k] = m1[k];
- }
- for (var _b = 0, _c = Object.keys(m2); _b < _c.length; _b++) {
- var k = _c[_b];
- m[k] = m2[k];
- }
- return m;
- };
- /**
- * @param {?} m1
- * @param {?} m2
- * @return {?}
- */
- StringMapWrapper.equals = function (m1, m2) {
- var /** @type {?} */ k1 = Object.keys(m1);
- var /** @type {?} */ k2 = Object.keys(m2);
- if (k1.length != k2.length) {
- return false;
- }
- for (var /** @type {?} */ i = 0; i < k1.length; i++) {
- var /** @type {?} */ key = k1[i];
- if (m1[key] !== m2[key]) {
- return false;
- }
- }
- return true;
- };
- return StringMapWrapper;
-}());
-var ListWrapper = (function () {
- function ListWrapper() {
- }
- /**
- * @param {?} arr
- * @param {?} condition
- * @return {?}
- */
- ListWrapper.findLast = function (arr, condition) {
- for (var /** @type {?} */ i = arr.length - 1; i >= 0; i--) {
- if (condition(arr[i])) {
- return arr[i];
- }
- }
- return null;
- };
- /**
- * @param {?} list
- * @param {?} items
- * @return {?}
- */
- ListWrapper.removeAll = function (list, items) {
- for (var /** @type {?} */ i = 0; i < items.length; ++i) {
- var /** @type {?} */ index = list.indexOf(items[i]);
- if (index > -1) {
- list.splice(index, 1);
- }
- }
- };
- /**
- * @param {?} list
- * @param {?} el
- * @return {?}
- */
- ListWrapper.remove = function (list, el) {
- var /** @type {?} */ index = list.indexOf(el);
- if (index > -1) {
- list.splice(index, 1);
- return true;
- }
- return false;
- };
- /**
- * @param {?} a
- * @param {?} b
- * @return {?}
- */
- ListWrapper.equals = function (a, b) {
- if (a.length != b.length)
- return false;
- for (var /** @type {?} */ i = 0; i < a.length; ++i) {
- if (a[i] !== b[i])
- return false;
- }
- return true;
- };
- /**
- * @param {?} list
- * @return {?}
- */
- ListWrapper.flatten = function (list) {
- return list.reduce(function (flat, item) {
- var /** @type {?} */ flatItem = Array.isArray(item) ? ListWrapper.flatten(item) : item;
- return ((flat)).concat(flatItem);
- }, []);
- };
- return ListWrapper;
-}());
-/**
- * @param {?} obj
- * @return {?}
- */
-function isListLikeIterable(obj) {
- if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__lang__["f" /* isJsObject */])(obj))
- return false;
- return Array.isArray(obj) ||
- (!(obj instanceof Map) &&
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__lang__["g" /* getSymbolIterator */])() in obj); // JS Iterable have a Symbol.iterator prop
-}
-/**
- * @param {?} a
- * @param {?} b
- * @param {?} comparator
- * @return {?}
- */
-function areIterablesEqual(a, b, comparator) {
- var /** @type {?} */ iterator1 = a[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__lang__["g" /* getSymbolIterator */])()]();
- var /** @type {?} */ iterator2 = b[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__lang__["g" /* getSymbolIterator */])()]();
- while (true) {
- var /** @type {?} */ item1 = iterator1.next();
- var /** @type {?} */ item2 = iterator2.next();
- if (item1.done && item2.done)
- return true;
- if (item1.done || item2.done)
- return false;
- if (!comparator(item1.value, item2.value))
- return false;
- }
-}
-/**
- * @param {?} obj
- * @param {?} fn
- * @return {?}
- */
-function iterateListLike(obj, fn) {
- if (Array.isArray(obj)) {
- for (var /** @type {?} */ i = 0; i < obj.length; i++) {
- fn(obj[i]);
- }
- }
- else {
- var /** @type {?} */ iterator = obj[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__lang__["g" /* getSymbolIterator */])()]();
- var /** @type {?} */ item = void 0;
- while (!((item = iterator.next()).done)) {
- fn(item.value);
- }
- }
-}
-//# sourceMappingURL=collection.js.map
-
-/***/ }),
-/* 79 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__injectable__ = __webpack_require__(20);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__html_tags__ = __webpack_require__(228);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__interpolation_config__ = __webpack_require__(46);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__parser__ = __webpack_require__(92);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_3__parser__["b"]; });
-/* unused harmony reexport TreeError */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return HtmlParser; });
-/**
- * @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 = (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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-var __metadata = (this && this.__metadata) || function (k, v) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
-};
-
-
-
-
-
-var HtmlParser = (function (_super) {
- __extends(HtmlParser, _super);
- function HtmlParser() {
- _super.call(this, __WEBPACK_IMPORTED_MODULE_1__html_tags__["a" /* getHtmlTagDefinition */]);
- }
- /**
- * @param {?} source
- * @param {?} url
- * @param {?=} parseExpansionForms
- * @param {?=} interpolationConfig
- * @return {?}
- */
- HtmlParser.prototype.parse = function (source, url, parseExpansionForms, interpolationConfig) {
- if (parseExpansionForms === void 0) { parseExpansionForms = false; }
- if (interpolationConfig === void 0) { interpolationConfig = __WEBPACK_IMPORTED_MODULE_2__interpolation_config__["a" /* DEFAULT_INTERPOLATION_CONFIG */]; }
- return _super.prototype.parse.call(this, source, url, parseExpansionForms, interpolationConfig);
- };
- HtmlParser = __decorate([
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__injectable__["a" /* CompilerInjectable */])(),
- __metadata('design:paramtypes', [])
- ], HtmlParser);
- return HtmlParser;
-}(__WEBPACK_IMPORTED_MODULE_3__parser__["a" /* Parser */]));
-//# sourceMappingURL=html_parser.js.map
-
-/***/ }),
-/* 80 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TagContentType; });
-/* harmony export (immutable) */ __webpack_exports__["e"] = splitNsName;
-/* harmony export (immutable) */ __webpack_exports__["c"] = getNsPrefix;
-/* harmony export (immutable) */ __webpack_exports__["b"] = mergeNsAndName;
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return NAMED_ENTITIES; });
-var TagContentType = {};
-TagContentType.RAW_TEXT = 0;
-TagContentType.ESCAPABLE_RAW_TEXT = 1;
-TagContentType.PARSABLE_DATA = 2;
-TagContentType[TagContentType.RAW_TEXT] = "RAW_TEXT";
-TagContentType[TagContentType.ESCAPABLE_RAW_TEXT] = "ESCAPABLE_RAW_TEXT";
-TagContentType[TagContentType.PARSABLE_DATA] = "PARSABLE_DATA";
-/**
- * @param {?} elementName
- * @return {?}
- */
-function splitNsName(elementName) {
- if (elementName[0] != ':') {
- return [null, elementName];
- }
- var /** @type {?} */ colonIndex = elementName.indexOf(':', 1);
- if (colonIndex == -1) {
- throw new Error("Unsupported format \"" + elementName + "\" expecting \":namespace:name\"");
- }
- return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];
-}
-/**
- * @param {?} fullName
- * @return {?}
- */
-function getNsPrefix(fullName) {
- return fullName === null ? null : splitNsName(fullName)[0];
-}
-/**
- * @param {?} prefix
- * @param {?} localName
- * @return {?}
- */
-function mergeNsAndName(prefix, localName) {
- return prefix ? ":" + prefix + ":" + localName : localName;
-}
-// see http://www.w3.org/TR/html51/syntax.html#named-character-references
-// see https://html.spec.whatwg.org/multipage/entities.json
-// This list is not exhaustive to keep the compiler footprint low.
-// The `{` / `ƫ` syntax should be used when the named character reference does not exist.
-var /** @type {?} */ NAMED_ENTITIES = {
- 'Aacute': '\u00C1',
- 'aacute': '\u00E1',
- 'Acirc': '\u00C2',
- 'acirc': '\u00E2',
- 'acute': '\u00B4',
- 'AElig': '\u00C6',
- 'aelig': '\u00E6',
- 'Agrave': '\u00C0',
- 'agrave': '\u00E0',
- 'alefsym': '\u2135',
- 'Alpha': '\u0391',
- 'alpha': '\u03B1',
- 'amp': '&',
- 'and': '\u2227',
- 'ang': '\u2220',
- 'apos': '\u0027',
- 'Aring': '\u00C5',
- 'aring': '\u00E5',
- 'asymp': '\u2248',
- 'Atilde': '\u00C3',
- 'atilde': '\u00E3',
- 'Auml': '\u00C4',
- 'auml': '\u00E4',
- 'bdquo': '\u201E',
- 'Beta': '\u0392',
- 'beta': '\u03B2',
- 'brvbar': '\u00A6',
- 'bull': '\u2022',
- 'cap': '\u2229',
- 'Ccedil': '\u00C7',
- 'ccedil': '\u00E7',
- 'cedil': '\u00B8',
- 'cent': '\u00A2',
- 'Chi': '\u03A7',
- 'chi': '\u03C7',
- 'circ': '\u02C6',
- 'clubs': '\u2663',
- 'cong': '\u2245',
- 'copy': '\u00A9',
- 'crarr': '\u21B5',
- 'cup': '\u222A',
- 'curren': '\u00A4',
- 'dagger': '\u2020',
- 'Dagger': '\u2021',
- 'darr': '\u2193',
- 'dArr': '\u21D3',
- 'deg': '\u00B0',
- 'Delta': '\u0394',
- 'delta': '\u03B4',
- 'diams': '\u2666',
- 'divide': '\u00F7',
- 'Eacute': '\u00C9',
- 'eacute': '\u00E9',
- 'Ecirc': '\u00CA',
- 'ecirc': '\u00EA',
- 'Egrave': '\u00C8',
- 'egrave': '\u00E8',
- 'empty': '\u2205',
- 'emsp': '\u2003',
- 'ensp': '\u2002',
- 'Epsilon': '\u0395',
- 'epsilon': '\u03B5',
- 'equiv': '\u2261',
- 'Eta': '\u0397',
- 'eta': '\u03B7',
- 'ETH': '\u00D0',
- 'eth': '\u00F0',
- 'Euml': '\u00CB',
- 'euml': '\u00EB',
- 'euro': '\u20AC',
- 'exist': '\u2203',
- 'fnof': '\u0192',
- 'forall': '\u2200',
- 'frac12': '\u00BD',
- 'frac14': '\u00BC',
- 'frac34': '\u00BE',
- 'frasl': '\u2044',
- 'Gamma': '\u0393',
- 'gamma': '\u03B3',
- 'ge': '\u2265',
- 'gt': '>',
- 'harr': '\u2194',
- 'hArr': '\u21D4',
- 'hearts': '\u2665',
- 'hellip': '\u2026',
- 'Iacute': '\u00CD',
- 'iacute': '\u00ED',
- 'Icirc': '\u00CE',
- 'icirc': '\u00EE',
- 'iexcl': '\u00A1',
- 'Igrave': '\u00CC',
- 'igrave': '\u00EC',
- 'image': '\u2111',
- 'infin': '\u221E',
- 'int': '\u222B',
- 'Iota': '\u0399',
- 'iota': '\u03B9',
- 'iquest': '\u00BF',
- 'isin': '\u2208',
- 'Iuml': '\u00CF',
- 'iuml': '\u00EF',
- 'Kappa': '\u039A',
- 'kappa': '\u03BA',
- 'Lambda': '\u039B',
- 'lambda': '\u03BB',
- 'lang': '\u27E8',
- 'laquo': '\u00AB',
- 'larr': '\u2190',
- 'lArr': '\u21D0',
- 'lceil': '\u2308',
- 'ldquo': '\u201C',
- 'le': '\u2264',
- 'lfloor': '\u230A',
- 'lowast': '\u2217',
- 'loz': '\u25CA',
- 'lrm': '\u200E',
- 'lsaquo': '\u2039',
- 'lsquo': '\u2018',
- 'lt': '<',
- 'macr': '\u00AF',
- 'mdash': '\u2014',
- 'micro': '\u00B5',
- 'middot': '\u00B7',
- 'minus': '\u2212',
- 'Mu': '\u039C',
- 'mu': '\u03BC',
- 'nabla': '\u2207',
- 'nbsp': '\u00A0',
- 'ndash': '\u2013',
- 'ne': '\u2260',
- 'ni': '\u220B',
- 'not': '\u00AC',
- 'notin': '\u2209',
- 'nsub': '\u2284',
- 'Ntilde': '\u00D1',
- 'ntilde': '\u00F1',
- 'Nu': '\u039D',
- 'nu': '\u03BD',
- 'Oacute': '\u00D3',
- 'oacute': '\u00F3',
- 'Ocirc': '\u00D4',
- 'ocirc': '\u00F4',
- 'OElig': '\u0152',
- 'oelig': '\u0153',
- 'Ograve': '\u00D2',
- 'ograve': '\u00F2',
- 'oline': '\u203E',
- 'Omega': '\u03A9',
- 'omega': '\u03C9',
- 'Omicron': '\u039F',
- 'omicron': '\u03BF',
- 'oplus': '\u2295',
- 'or': '\u2228',
- 'ordf': '\u00AA',
- 'ordm': '\u00BA',
- 'Oslash': '\u00D8',
- 'oslash': '\u00F8',
- 'Otilde': '\u00D5',
- 'otilde': '\u00F5',
- 'otimes': '\u2297',
- 'Ouml': '\u00D6',
- 'ouml': '\u00F6',
- 'para': '\u00B6',
- 'permil': '\u2030',
- 'perp': '\u22A5',
- 'Phi': '\u03A6',
- 'phi': '\u03C6',
- 'Pi': '\u03A0',
- 'pi': '\u03C0',
- 'piv': '\u03D6',
- 'plusmn': '\u00B1',
- 'pound': '\u00A3',
- 'prime': '\u2032',
- 'Prime': '\u2033',
- 'prod': '\u220F',
- 'prop': '\u221D',
- 'Psi': '\u03A8',
- 'psi': '\u03C8',
- 'quot': '\u0022',
- 'radic': '\u221A',
- 'rang': '\u27E9',
- 'raquo': '\u00BB',
- 'rarr': '\u2192',
- 'rArr': '\u21D2',
- 'rceil': '\u2309',
- 'rdquo': '\u201D',
- 'real': '\u211C',
- 'reg': '\u00AE',
- 'rfloor': '\u230B',
- 'Rho': '\u03A1',
- 'rho': '\u03C1',
- 'rlm': '\u200F',
- 'rsaquo': '\u203A',
- 'rsquo': '\u2019',
- 'sbquo': '\u201A',
- 'Scaron': '\u0160',
- 'scaron': '\u0161',
- 'sdot': '\u22C5',
- 'sect': '\u00A7',
- 'shy': '\u00AD',
- 'Sigma': '\u03A3',
- 'sigma': '\u03C3',
- 'sigmaf': '\u03C2',
- 'sim': '\u223C',
- 'spades': '\u2660',
- 'sub': '\u2282',
- 'sube': '\u2286',
- 'sum': '\u2211',
- 'sup': '\u2283',
- 'sup1': '\u00B9',
- 'sup2': '\u00B2',
- 'sup3': '\u00B3',
- 'supe': '\u2287',
- 'szlig': '\u00DF',
- 'Tau': '\u03A4',
- 'tau': '\u03C4',
- 'there4': '\u2234',
- 'Theta': '\u0398',
- 'theta': '\u03B8',
- 'thetasym': '\u03D1',
- 'thinsp': '\u2009',
- 'THORN': '\u00DE',
- 'thorn': '\u00FE',
- 'tilde': '\u02DC',
- 'times': '\u00D7',
- 'trade': '\u2122',
- 'Uacute': '\u00DA',
- 'uacute': '\u00FA',
- 'uarr': '\u2191',
- 'uArr': '\u21D1',
- 'Ucirc': '\u00DB',
- 'ucirc': '\u00FB',
- 'Ugrave': '\u00D9',
- 'ugrave': '\u00F9',
- 'uml': '\u00A8',
- 'upsih': '\u03D2',
- 'Upsilon': '\u03A5',
- 'upsilon': '\u03C5',
- 'Uuml': '\u00DC',
- 'uuml': '\u00FC',
- 'weierp': '\u2118',
- 'Xi': '\u039E',
- 'xi': '\u03BE',
- 'Yacute': '\u00DD',
- 'yacute': '\u00FD',
- 'yen': '\u00A5',
- 'yuml': '\u00FF',
- 'Yuml': '\u0178',
- 'Zeta': '\u0396',
- 'zeta': '\u03B6',
- 'zwj': '\u200D',
- 'zwnj': '\u200C',
-};
-//# sourceMappingURL=tags.js.map
-
-/***/ }),
-/* 81 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__facade_lang__ = __webpack_require__(6);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__injectable__ = __webpack_require__(20);
-/* unused harmony export createUrlResolverWithoutPackagePrefix */
-/* harmony export (immutable) */ __webpack_exports__["c"] = createOfflineCompileUrlResolver;
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return DEFAULT_PACKAGE_URL_PROVIDER; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return UrlResolver; });
-/* harmony export (immutable) */ __webpack_exports__["b"] = getUrlScheme;
-/**
- * @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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-var __metadata = (this && this.__metadata) || function (k, v) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
-};
-
-
-
-/**
- * Create a {\@link UrlResolver} with no package prefix.
- * @return {?}
- */
-function createUrlResolverWithoutPackagePrefix() {
- return new UrlResolver();
-}
-/**
- * @return {?}
- */
-function createOfflineCompileUrlResolver() {
- return new UrlResolver('.');
-}
-/**
- * A default provider for {@link PACKAGE_ROOT_URL} that maps to '/'.
- */
-var /** @type {?} */ DEFAULT_PACKAGE_URL_PROVIDER = {
- provide: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_1" /* PACKAGE_ROOT_URL */],
- useValue: '/'
-};
-/**
- * Used by the {\@link Compiler} when resolving HTML and CSS template URLs.
- *
- * This class can be overridden by the application developer to create custom behavior.
- *
- * See {\@link Compiler}
- *
- * ## Example
- *
- * {\@example compiler/ts/url_resolver/url_resolver.ts region='url_resolver'}
- *
- * \@security When compiling templates at runtime, you must
- * ensure that the entire template comes from a trusted source.
- * Attacker-controlled data introduced by a template could expose your
- * application to XSS risks. For more detail, see the [Security Guide](http://g.co/ng/security).
- */
-var UrlResolver = (function () {
- /**
- * @param {?=} _packagePrefix
- */
- function UrlResolver(_packagePrefix) {
- if (_packagePrefix === void 0) { _packagePrefix = null; }
- this._packagePrefix = _packagePrefix;
- }
- /**
- * Resolves the `url` given the `baseUrl`:
- * - when the `url` is null, the `baseUrl` is returned,
- * - if `url` is relative ('path/to/here', './path/to/here'), the resolved url is a combination of
- * `baseUrl` and `url`,
- * - if `url` is absolute (it has a scheme: 'http://', 'https://' or start with '/'), the `url` is
- * returned as is (ignoring the `baseUrl`)
- * @param {?} baseUrl
- * @param {?} url
- * @return {?}
- */
- UrlResolver.prototype.resolve = function (baseUrl, url) {
- var /** @type {?} */ resolvedUrl = url;
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["c" /* isPresent */])(baseUrl) && baseUrl.length > 0) {
- resolvedUrl = _resolveUrl(baseUrl, resolvedUrl);
- }
- var /** @type {?} */ resolvedParts = _split(resolvedUrl);
- var /** @type {?} */ prefix = this._packagePrefix;
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["c" /* isPresent */])(prefix) && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["c" /* isPresent */])(resolvedParts) &&
- resolvedParts[_ComponentIndex.Scheme] == 'package') {
- var /** @type {?} */ path = resolvedParts[_ComponentIndex.Path];
- prefix = prefix.replace(/\/+$/, '');
- path = path.replace(/^\/+/, '');
- return prefix + "/" + path;
- }
- return resolvedUrl;
- };
- /** @nocollapse */
- UrlResolver.ctorParameters = function () { return [
- { type: undefined, decorators: [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["q" /* Inject */], args: [__WEBPACK_IMPORTED_MODULE_0__angular_core__["_1" /* PACKAGE_ROOT_URL */],] },] },
- ]; };
- UrlResolver = __decorate([
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__injectable__["a" /* CompilerInjectable */])(),
- __metadata('design:paramtypes', [String])
- ], UrlResolver);
- return UrlResolver;
-}());
-function UrlResolver_tsickle_Closure_declarations() {
- /**
- * @nocollapse
- * @type {?}
- */
- UrlResolver.ctorParameters;
- /** @type {?} */
- UrlResolver.prototype._packagePrefix;
-}
-/**
- * Extract the scheme of a URL.
- * @param {?} url
- * @return {?}
- */
-function getUrlScheme(url) {
- var /** @type {?} */ match = _split(url);
- return (match && match[_ComponentIndex.Scheme]) || '';
-}
-/**
- * Builds a URI string from already-encoded parts.
- *
- * No encoding is performed. Any component may be omitted as either null or
- * undefined.
- *
- * @param {?=} opt_scheme The scheme such as 'http'.
- * @param {?=} opt_userInfo The user name before the '\@'.
- * @param {?=} opt_domain The domain such as 'www.google.com', already
- * URI-encoded.
- * @param {?=} opt_port The port number.
- * @param {?=} opt_path The path, already URI-encoded. If it is not
- * empty, it must begin with a slash.
- * @param {?=} opt_queryData The URI-encoded query data.
- * @param {?=} opt_fragment The URI-encoded fragment identifier.
- * @return {?} The fully combined URI.
- */
-function _buildFromEncodedParts(opt_scheme, opt_userInfo, opt_domain, opt_port, opt_path, opt_queryData, opt_fragment) {
- var /** @type {?} */ out = [];
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["c" /* isPresent */])(opt_scheme)) {
- out.push(opt_scheme + ':');
- }
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["c" /* isPresent */])(opt_domain)) {
- out.push('//');
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["c" /* isPresent */])(opt_userInfo)) {
- out.push(opt_userInfo + '@');
- }
- out.push(opt_domain);
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["c" /* isPresent */])(opt_port)) {
- out.push(':' + opt_port);
- }
- }
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["c" /* isPresent */])(opt_path)) {
- out.push(opt_path);
- }
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["c" /* isPresent */])(opt_queryData)) {
- out.push('?' + opt_queryData);
- }
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["c" /* isPresent */])(opt_fragment)) {
- out.push('#' + opt_fragment);
- }
- return out.join('');
-}
-/**
- * A regular expression for breaking a URI into its component parts.
- *
- * {@link http://www.gbiv.com/protocols/uri/rfc/rfc3986.html#RFC2234} says
- * As the "first-match-wins" algorithm is identical to the "greedy"
- * disambiguation method used by POSIX regular expressions, it is natural and
- * commonplace to use a regular expression for parsing the potential five
- * components of a URI reference.
- *
- * The following line is the regular expression for breaking-down a
- * well-formed URI reference into its components.
- *
- *
- * ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?
- * 12 3 4 5 6 7 8 9
- *
- *
- * The numbers in the second line above are only to assist readability; they
- * indicate the reference points for each subexpression (i.e., each paired
- * parenthesis). We refer to the value matched for subexpression as $.
- * For example, matching the above expression to
- *
- * http://www.ics.uci.edu/pub/ietf/uri/#Related
- *
- * results in the following subexpression matches:
- *
- * $1 = http:
- * $2 = http
- * $3 = //www.ics.uci.edu
- * $4 = www.ics.uci.edu
- * $5 = /pub/ietf/uri/
- * $6 =
- * $7 =
- * $8 = #Related
- * $9 = Related
- *
- * where indicates that the component is not present, as is the
- * case for the query component in the above example. Therefore, we can
- * determine the value of the five components as
- *
- * scheme = $2
- * authority = $4
- * path = $5
- * query = $7
- * fragment = $9
- *
- *
- * The regular expression has been modified slightly to expose the
- * userInfo, domain, and port separately from the authority.
- * The modified version yields
- *
- * $1 = http scheme
- * $2 = userInfo -\
- * $3 = www.ics.uci.edu domain | authority
- * $4 = port -/
- * $5 = /pub/ietf/uri/ path
- * $6 = query without ?
- * $7 = Related fragment without #
- *
- * @type {!RegExp}
- * @internal
- */
-var /** @type {?} */ _splitRe = new RegExp('^' +
- '(?:' +
- '([^:/?#.]+)' +
- // used by other URL parts such as :,
- // ?, /, #, and .
- ':)?' +
- '(?://' +
- '(?:([^/?#]*)@)?' +
- '([\\w\\d\\-\\u0100-\\uffff.%]*)' +
- // digits, dashes, dots, percent
- // escapes, and unicode characters.
- '(?::([0-9]+))?' +
- ')?' +
- '([^?#]+)?' +
- '(?:\\?([^#]*))?' +
- '(?:#(.*))?' +
- '$');
-var _ComponentIndex = {};
-_ComponentIndex.Scheme = 1;
-_ComponentIndex.UserInfo = 2;
-_ComponentIndex.Domain = 3;
-_ComponentIndex.Port = 4;
-_ComponentIndex.Path = 5;
-_ComponentIndex.QueryData = 6;
-_ComponentIndex.Fragment = 7;
-_ComponentIndex[_ComponentIndex.Scheme] = "Scheme";
-_ComponentIndex[_ComponentIndex.UserInfo] = "UserInfo";
-_ComponentIndex[_ComponentIndex.Domain] = "Domain";
-_ComponentIndex[_ComponentIndex.Port] = "Port";
-_ComponentIndex[_ComponentIndex.Path] = "Path";
-_ComponentIndex[_ComponentIndex.QueryData] = "QueryData";
-_ComponentIndex[_ComponentIndex.Fragment] = "Fragment";
-/**
- * Splits a URI into its component parts.
- *
- * Each component can be accessed via the component indices; for example:
- *
- * goog.uri.utils.split(someStr)[goog.uri.utils.CompontentIndex.QUERY_DATA];
- *
- *
- * @param {?} uri The URI string to examine.
- * @return {?} Each component still URI-encoded.
- * Each component that is present will contain the encoded value, whereas
- * components that are not present will be undefined or empty, depending
- * on the browser's regular expression implementation. Never null, since
- * arbitrary strings may still look like path names.
- */
-function _split(uri) {
- return uri.match(_splitRe);
-}
-/**
- * Removes dot segments in given path component, as described in
- * RFC 3986, section 5.2.4.
- *
- * @param {?} path A non-empty path component.
- * @return {?} Path component with removed dot segments.
- */
-function _removeDotSegments(path) {
- if (path == '/')
- return '/';
- var /** @type {?} */ leadingSlash = path[0] == '/' ? '/' : '';
- var /** @type {?} */ trailingSlash = path[path.length - 1] === '/' ? '/' : '';
- var /** @type {?} */ segments = path.split('/');
- var /** @type {?} */ out = [];
- var /** @type {?} */ up = 0;
- for (var /** @type {?} */ pos = 0; pos < segments.length; pos++) {
- var /** @type {?} */ segment = segments[pos];
- switch (segment) {
- case '':
- case '.':
- break;
- case '..':
- if (out.length > 0) {
- out.pop();
- }
- else {
- up++;
- }
- break;
- default:
- out.push(segment);
- }
- }
- if (leadingSlash == '') {
- while (up-- > 0) {
- out.unshift('..');
- }
- if (out.length === 0)
- out.push('.');
- }
- return leadingSlash + out.join('/') + trailingSlash;
-}
-/**
- * Takes an array of the parts from split and canonicalizes the path part
- * and then joins all the parts.
- * @param {?} parts
- * @return {?}
- */
-function _joinAndCanonicalizePath(parts) {
- var /** @type {?} */ path = parts[_ComponentIndex.Path];
- path = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["d" /* isBlank */])(path) ? '' : _removeDotSegments(path);
- parts[_ComponentIndex.Path] = path;
- return _buildFromEncodedParts(parts[_ComponentIndex.Scheme], parts[_ComponentIndex.UserInfo], parts[_ComponentIndex.Domain], parts[_ComponentIndex.Port], path, parts[_ComponentIndex.QueryData], parts[_ComponentIndex.Fragment]);
-}
-/**
- * Resolves a URL.
- * @param {?} base The URL acting as the base URL.
- * @param {?} url
- * @return {?}
- */
-function _resolveUrl(base, url) {
- var /** @type {?} */ parts = _split(encodeURI(url));
- var /** @type {?} */ baseParts = _split(base);
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["c" /* isPresent */])(parts[_ComponentIndex.Scheme])) {
- return _joinAndCanonicalizePath(parts);
- }
- else {
- parts[_ComponentIndex.Scheme] = baseParts[_ComponentIndex.Scheme];
- }
- for (var /** @type {?} */ i = _ComponentIndex.Scheme; i <= _ComponentIndex.Port; i++) {
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["d" /* isBlank */])(parts[i])) {
- parts[i] = baseParts[i];
- }
- }
- if (parts[_ComponentIndex.Path][0] == '/') {
- return _joinAndCanonicalizePath(parts);
- }
- var /** @type {?} */ path = baseParts[_ComponentIndex.Path];
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["d" /* isBlank */])(path))
- path = '/';
- var /** @type {?} */ index = path.lastIndexOf('/');
- path = path.substring(0, index + 1) + parts[_ComponentIndex.Path];
- parts[_ComponentIndex.Path] = path;
- return _joinAndCanonicalizePath(parts);
-}
-//# sourceMappingURL=url_resolver.js.map
-
-/***/ }),
-/* 82 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compile_metadata__ = __webpack_require__(15);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__compiler_util_identifier_util__ = __webpack_require__(45);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__output_output_ast__ = __webpack_require__(10);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__private_import_core__ = __webpack_require__(17);
-/* harmony export (immutable) */ __webpack_exports__["c"] = getPropertyInView;
-/* harmony export (immutable) */ __webpack_exports__["b"] = injectFromViewParentInjector;
-/* harmony export (immutable) */ __webpack_exports__["a"] = getViewClassName;
-/* harmony export (immutable) */ __webpack_exports__["d"] = getHandleEventMethodName;
-/**
- * @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 = (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 __());
-};
-
-
-
-
-/**
- * @param {?} property
- * @param {?} callingView
- * @param {?} definedView
- * @return {?}
- */
-function getPropertyInView(property, callingView, definedView) {
- if (callingView === definedView) {
- return property;
- }
- else {
- var /** @type {?} */ viewProp = __WEBPACK_IMPORTED_MODULE_2__output_output_ast__["e" /* THIS_EXPR */];
- var /** @type {?} */ currView = callingView;
- while (currView !== definedView && currView.declarationElement.view) {
- currView = currView.declarationElement.view;
- viewProp = viewProp.prop('parentView');
- }
- if (currView !== definedView) {
- throw new Error("Internal error: Could not calculate a property in a parent view: " + property);
- }
- return property.visitExpression(new _ReplaceViewTransformer(viewProp, definedView), null);
- }
-}
-var _ReplaceViewTransformer = (function (_super) {
- __extends(_ReplaceViewTransformer, _super);
- /**
- * @param {?} _viewExpr
- * @param {?} _view
- */
- function _ReplaceViewTransformer(_viewExpr, _view) {
- _super.call(this);
- this._viewExpr = _viewExpr;
- this._view = _view;
- }
- /**
- * @param {?} expr
- * @return {?}
- */
- _ReplaceViewTransformer.prototype._isThis = function (expr) {
- return expr instanceof __WEBPACK_IMPORTED_MODULE_2__output_output_ast__["A" /* ReadVarExpr */] && expr.builtin === __WEBPACK_IMPORTED_MODULE_2__output_output_ast__["F" /* BuiltinVar */].This;
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- _ReplaceViewTransformer.prototype.visitReadVarExpr = function (ast, context) {
- return this._isThis(ast) ? this._viewExpr : ast;
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- _ReplaceViewTransformer.prototype.visitReadPropExpr = function (ast, context) {
- if (this._isThis(ast.receiver)) {
- // Note: Don't cast for members of the AppView base class...
- if (this._view.fields.some(function (field) { return field.name == ast.name; }) ||
- this._view.getters.some(function (field) { return field.name == ast.name; })) {
- return this._viewExpr.cast(this._view.classType).prop(ast.name);
- }
- }
- return _super.prototype.visitReadPropExpr.call(this, ast, context);
- };
- return _ReplaceViewTransformer;
-}(__WEBPACK_IMPORTED_MODULE_2__output_output_ast__["G" /* ExpressionTransformer */]));
-function _ReplaceViewTransformer_tsickle_Closure_declarations() {
- /** @type {?} */
- _ReplaceViewTransformer.prototype._viewExpr;
- /** @type {?} */
- _ReplaceViewTransformer.prototype._view;
-}
-/**
- * @param {?} view
- * @param {?} token
- * @param {?} optional
- * @return {?}
- */
-function injectFromViewParentInjector(view, token, optional) {
- var /** @type {?} */ viewExpr;
- if (view.viewType === __WEBPACK_IMPORTED_MODULE_3__private_import_core__["n" /* ViewType */].HOST) {
- viewExpr = __WEBPACK_IMPORTED_MODULE_2__output_output_ast__["e" /* THIS_EXPR */];
- }
- else {
- viewExpr = __WEBPACK_IMPORTED_MODULE_2__output_output_ast__["e" /* THIS_EXPR */].prop('parentView');
- }
- var /** @type {?} */ args = [__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__compiler_util_identifier_util__["b" /* createDiTokenExpression */])(token), __WEBPACK_IMPORTED_MODULE_2__output_output_ast__["e" /* THIS_EXPR */].prop('parentIndex')];
- if (optional) {
- args.push(__WEBPACK_IMPORTED_MODULE_2__output_output_ast__["b" /* NULL_EXPR */]);
- }
- return viewExpr.callMethod('injectorGet', args);
-}
-/**
- * @param {?} component
- * @param {?} embeddedTemplateIndex
- * @return {?}
- */
-function getViewClassName(component, embeddedTemplateIndex) {
- return "View_" + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__compile_metadata__["a" /* identifierName */])(component.type) + embeddedTemplateIndex;
-}
-/**
- * @param {?} elementIndex
- * @return {?}
- */
-function getHandleEventMethodName(elementIndex) {
- return "handleEvent_" + elementIndex;
-}
-//# sourceMappingURL=util.js.map
-
-/***/ }),
-/* 83 */,
-/* 84 */,
-/* 85 */
-/***/ (function(module, exports) {
-
-module.exports = function(it){
- if(typeof it != 'function')throw TypeError(it + ' is not a function!');
- return it;
-};
-
-/***/ }),
-/* 86 */
-/***/ (function(module, exports) {
-
-var toString = {}.toString;
-
-module.exports = function(it){
- return toString.call(it).slice(8, -1);
-};
-
-/***/ }),
-/* 87 */
-/***/ (function(module, exports) {
-
-module.exports = function(bitmap, value){
- return {
- enumerable : !(bitmap & 1),
- configurable: !(bitmap & 2),
- writable : !(bitmap & 4),
- value : value
- };
-};
-
-/***/ }),
-/* 88 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 7.1.1 ToPrimitive(input [, PreferredType])
-var isObject = __webpack_require__(14);
-// instead of the ES6 spec version, we didn't implement @@toPrimitive case
-// and the second argument - flag - preferred type is a string
-module.exports = function(it, S){
- if(!isObject(it))return it;
- var fn, val;
- if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
- if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
- if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
- throw TypeError("Can't convert object to primitive value");
-};
-
-/***/ }),
-/* 89 */,
-/* 90 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/**
- * @coreapi
- * @module state
- */ /** for typedoc */
-
-var common_1 = __webpack_require__(8);
-var predicates_1 = __webpack_require__(12);
-/**
- * Encapsulate the target (destination) state/params/options of a [[Transition]].
- *
- * This class is frequently used to redirect a transition to a new destination.
- *
- * See:
- *
- * - [[HookResult]]
- * - [[TransitionHookFn]]
- * - [[TransitionService.onStart]]
- *
- * To create a `TargetState`, use [[StateService.target]].
- *
- * ---
- *
- * This class wraps:
- *
- * 1) an identifier for a state
- * 2) a set of parameters
- * 3) and transition options
- * 4) the registered state object (the [[StateDeclaration]])
- *
- * Many UI-Router APIs such as [[StateService.go]] take a [[StateOrName]] argument which can
- * either be a *state object* (a [[StateDeclaration]] or [[State]]) or a *state name* (a string).
- * The `TargetState` class normalizes those options.
- *
- * A `TargetState` may be valid (the state being targeted exists in the registry)
- * or invalid (the state being targeted is not registered).
- */
-var TargetState = (function () {
- /**
- * The TargetState constructor
- *
- * Note: Do not construct a `TargetState` manually.
- * To create a `TargetState`, use the [[StateService.target]] factory method.
- *
- * @param _identifier An identifier for a state.
- * Either a fully-qualified state name, or the object used to define the state.
- * @param _definition The internal state representation, if exists.
- * @param _params Parameters for the target state
- * @param _options Transition options.
- *
- * @internalapi
- */
- function TargetState(_identifier, _definition, _params, _options) {
- if (_options === void 0) { _options = {}; }
- this._identifier = _identifier;
- this._definition = _definition;
- this._options = _options;
- this._params = _params || {};
- }
- /** The name of the state this object targets */
- TargetState.prototype.name = function () {
- return this._definition && this._definition.name || this._identifier;
- };
- /** The identifier used when creating this TargetState */
- TargetState.prototype.identifier = function () {
- return this._identifier;
- };
- /** The target parameter values */
- TargetState.prototype.params = function () {
- return this._params;
- };
- /** The internal state object (if it was found) */
- TargetState.prototype.$state = function () {
- return this._definition;
- };
- /** The internal state declaration (if it was found) */
- TargetState.prototype.state = function () {
- return this._definition && this._definition.self;
- };
- /** The target options */
- TargetState.prototype.options = function () {
- return this._options;
- };
- /** True if the target state was found */
- TargetState.prototype.exists = function () {
- return !!(this._definition && this._definition.self);
- };
- /** True if the object is valid */
- TargetState.prototype.valid = function () {
- return !this.error();
- };
- /** If the object is invalid, returns the reason why */
- TargetState.prototype.error = function () {
- var base = this.options().relative;
- if (!this._definition && !!base) {
- var stateName = base.name ? base.name : base;
- return "Could not resolve '" + this.name() + "' from state '" + stateName + "'";
- }
- if (!this._definition)
- return "No such state '" + this.name() + "'";
- if (!this._definition.self)
- return "State '" + this.name() + "' has an invalid definition";
- };
- TargetState.prototype.toString = function () {
- return "'" + this.name() + "'" + common_1.toJson(this.params());
- };
- return TargetState;
-}());
-/** Returns true if the object has a state property that might be a state or state name */
-TargetState.isDef = function (obj) {
- return obj && obj.state && (predicates_1.isString(obj.state) || predicates_1.isString(obj.state.name));
-};
-exports.TargetState = TargetState;
-//# sourceMappingURL=targetState.js.map
-
-/***/ }),
-/* 91 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__chars__ = __webpack_require__(155);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__facade_lang__ = __webpack_require__(6);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__injectable__ = __webpack_require__(20);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ml_parser_interpolation_config__ = __webpack_require__(46);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ast__ = __webpack_require__(226);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__lexer__ = __webpack_require__(115);
-/* unused harmony export SplitInterpolation */
-/* unused harmony export TemplateBindingParseResult */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Parser; });
-/* unused harmony export _ParseAST */
-/**
- * @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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-var __metadata = (this && this.__metadata) || function (k, v) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
-};
-
-
-
-
-
-
-var SplitInterpolation = (function () {
- /**
- * @param {?} strings
- * @param {?} expressions
- * @param {?} offsets
- */
- function SplitInterpolation(strings, expressions, offsets) {
- this.strings = strings;
- this.expressions = expressions;
- this.offsets = offsets;
- }
- return SplitInterpolation;
-}());
-function SplitInterpolation_tsickle_Closure_declarations() {
- /** @type {?} */
- SplitInterpolation.prototype.strings;
- /** @type {?} */
- SplitInterpolation.prototype.expressions;
- /** @type {?} */
- SplitInterpolation.prototype.offsets;
-}
-var TemplateBindingParseResult = (function () {
- /**
- * @param {?} templateBindings
- * @param {?} warnings
- * @param {?} errors
- */
- function TemplateBindingParseResult(templateBindings, warnings, errors) {
- this.templateBindings = templateBindings;
- this.warnings = warnings;
- this.errors = errors;
- }
- return TemplateBindingParseResult;
-}());
-function TemplateBindingParseResult_tsickle_Closure_declarations() {
- /** @type {?} */
- TemplateBindingParseResult.prototype.templateBindings;
- /** @type {?} */
- TemplateBindingParseResult.prototype.warnings;
- /** @type {?} */
- TemplateBindingParseResult.prototype.errors;
-}
-/**
- * @param {?} config
- * @return {?}
- */
-function _createInterpolateRegExp(config) {
- var /** @type {?} */ pattern = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["h" /* escapeRegExp */])(config.start) + '([\\s\\S]*?)' + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["h" /* escapeRegExp */])(config.end);
- return new RegExp(pattern, 'g');
-}
-var Parser = (function () {
- /**
- * @param {?} _lexer
- */
- function Parser(_lexer) {
- this._lexer = _lexer;
- this.errors = [];
- }
- /**
- * @param {?} input
- * @param {?} location
- * @param {?=} interpolationConfig
- * @return {?}
- */
- Parser.prototype.parseAction = function (input, location, interpolationConfig) {
- if (interpolationConfig === void 0) { interpolationConfig = __WEBPACK_IMPORTED_MODULE_3__ml_parser_interpolation_config__["a" /* DEFAULT_INTERPOLATION_CONFIG */]; }
- this._checkNoInterpolation(input, location, interpolationConfig);
- var /** @type {?} */ sourceToLex = this._stripComments(input);
- var /** @type {?} */ tokens = this._lexer.tokenize(this._stripComments(input));
- var /** @type {?} */ ast = new _ParseAST(input, location, tokens, sourceToLex.length, true, this.errors, input.length - sourceToLex.length)
- .parseChain();
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["f" /* ASTWithSource */](ast, input, location, this.errors);
- };
- /**
- * @param {?} input
- * @param {?} location
- * @param {?=} interpolationConfig
- * @return {?}
- */
- Parser.prototype.parseBinding = function (input, location, interpolationConfig) {
- if (interpolationConfig === void 0) { interpolationConfig = __WEBPACK_IMPORTED_MODULE_3__ml_parser_interpolation_config__["a" /* DEFAULT_INTERPOLATION_CONFIG */]; }
- var /** @type {?} */ ast = this._parseBindingAst(input, location, interpolationConfig);
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["f" /* ASTWithSource */](ast, input, location, this.errors);
- };
- /**
- * @param {?} input
- * @param {?} location
- * @param {?=} interpolationConfig
- * @return {?}
- */
- Parser.prototype.parseSimpleBinding = function (input, location, interpolationConfig) {
- if (interpolationConfig === void 0) { interpolationConfig = __WEBPACK_IMPORTED_MODULE_3__ml_parser_interpolation_config__["a" /* DEFAULT_INTERPOLATION_CONFIG */]; }
- var /** @type {?} */ ast = this._parseBindingAst(input, location, interpolationConfig);
- var /** @type {?} */ errors = SimpleExpressionChecker.check(ast);
- if (errors.length > 0) {
- this._reportError("Host binding expression cannot contain " + errors.join(' '), input, location);
- }
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["f" /* ASTWithSource */](ast, input, location, this.errors);
- };
- /**
- * @param {?} message
- * @param {?} input
- * @param {?} errLocation
- * @param {?=} ctxLocation
- * @return {?}
- */
- Parser.prototype._reportError = function (message, input, errLocation, ctxLocation) {
- this.errors.push(new __WEBPACK_IMPORTED_MODULE_4__ast__["g" /* ParserError */](message, input, errLocation, ctxLocation));
- };
- /**
- * @param {?} input
- * @param {?} location
- * @param {?} interpolationConfig
- * @return {?}
- */
- Parser.prototype._parseBindingAst = function (input, location, interpolationConfig) {
- // Quotes expressions use 3rd-party expression language. We don't want to use
- // our lexer or parser for that, so we check for that ahead of time.
- var /** @type {?} */ quote = this._parseQuote(input, location);
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["c" /* isPresent */])(quote)) {
- return quote;
- }
- this._checkNoInterpolation(input, location, interpolationConfig);
- var /** @type {?} */ sourceToLex = this._stripComments(input);
- var /** @type {?} */ tokens = this._lexer.tokenize(sourceToLex);
- return new _ParseAST(input, location, tokens, sourceToLex.length, false, this.errors, input.length - sourceToLex.length)
- .parseChain();
- };
- /**
- * @param {?} input
- * @param {?} location
- * @return {?}
- */
- Parser.prototype._parseQuote = function (input, location) {
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["d" /* isBlank */])(input))
- return null;
- var /** @type {?} */ prefixSeparatorIndex = input.indexOf(':');
- if (prefixSeparatorIndex == -1)
- return null;
- var /** @type {?} */ prefix = input.substring(0, prefixSeparatorIndex).trim();
- if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lexer__["a" /* isIdentifier */])(prefix))
- return null;
- var /** @type {?} */ uninterpretedExpression = input.substring(prefixSeparatorIndex + 1);
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["h" /* Quote */](new __WEBPACK_IMPORTED_MODULE_4__ast__["i" /* ParseSpan */](0, input.length), prefix, uninterpretedExpression, location);
- };
- /**
- * @param {?} prefixToken
- * @param {?} input
- * @param {?} location
- * @return {?}
- */
- Parser.prototype.parseTemplateBindings = function (prefixToken, input, location) {
- var /** @type {?} */ tokens = this._lexer.tokenize(input);
- if (prefixToken) {
- // Prefix the tokens with the tokens from prefixToken but have them take no space (0 index).
- var /** @type {?} */ prefixTokens = this._lexer.tokenize(prefixToken).map(function (t) {
- t.index = 0;
- return t;
- });
- tokens.unshift.apply(tokens, prefixTokens);
- }
- return new _ParseAST(input, location, tokens, input.length, false, this.errors, 0)
- .parseTemplateBindings();
- };
- /**
- * @param {?} input
- * @param {?} location
- * @param {?=} interpolationConfig
- * @return {?}
- */
- Parser.prototype.parseInterpolation = function (input, location, interpolationConfig) {
- if (interpolationConfig === void 0) { interpolationConfig = __WEBPACK_IMPORTED_MODULE_3__ml_parser_interpolation_config__["a" /* DEFAULT_INTERPOLATION_CONFIG */]; }
- var /** @type {?} */ split = this.splitInterpolation(input, location, interpolationConfig);
- if (split == null)
- return null;
- var /** @type {?} */ expressions = [];
- for (var /** @type {?} */ i = 0; i < split.expressions.length; ++i) {
- var /** @type {?} */ expressionText = split.expressions[i];
- var /** @type {?} */ sourceToLex = this._stripComments(expressionText);
- var /** @type {?} */ tokens = this._lexer.tokenize(this._stripComments(split.expressions[i]));
- var /** @type {?} */ ast = new _ParseAST(input, location, tokens, sourceToLex.length, false, this.errors, split.offsets[i] + (expressionText.length - sourceToLex.length))
- .parseChain();
- expressions.push(ast);
- }
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["f" /* ASTWithSource */](new __WEBPACK_IMPORTED_MODULE_4__ast__["j" /* Interpolation */](new __WEBPACK_IMPORTED_MODULE_4__ast__["i" /* ParseSpan */](0, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["d" /* isBlank */])(input) ? 0 : input.length), split.strings, expressions), input, location, this.errors);
- };
- /**
- * @param {?} input
- * @param {?} location
- * @param {?=} interpolationConfig
- * @return {?}
- */
- Parser.prototype.splitInterpolation = function (input, location, interpolationConfig) {
- if (interpolationConfig === void 0) { interpolationConfig = __WEBPACK_IMPORTED_MODULE_3__ml_parser_interpolation_config__["a" /* DEFAULT_INTERPOLATION_CONFIG */]; }
- var /** @type {?} */ regexp = _createInterpolateRegExp(interpolationConfig);
- var /** @type {?} */ parts = input.split(regexp);
- if (parts.length <= 1) {
- return null;
- }
- var /** @type {?} */ strings = [];
- var /** @type {?} */ expressions = [];
- var /** @type {?} */ offsets = [];
- var /** @type {?} */ offset = 0;
- for (var /** @type {?} */ i = 0; i < parts.length; i++) {
- var /** @type {?} */ part = parts[i];
- if (i % 2 === 0) {
- // fixed string
- strings.push(part);
- offset += part.length;
- }
- else if (part.trim().length > 0) {
- offset += interpolationConfig.start.length;
- expressions.push(part);
- offsets.push(offset);
- offset += part.length + interpolationConfig.end.length;
- }
- else {
- this._reportError('Blank expressions are not allowed in interpolated strings', input, "at column " + this._findInterpolationErrorColumn(parts, i, interpolationConfig) + " in", location);
- expressions.push('$implict');
- offsets.push(offset);
- }
- }
- return new SplitInterpolation(strings, expressions, offsets);
- };
- /**
- * @param {?} input
- * @param {?} location
- * @return {?}
- */
- Parser.prototype.wrapLiteralPrimitive = function (input, location) {
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["f" /* ASTWithSource */](new __WEBPACK_IMPORTED_MODULE_4__ast__["k" /* LiteralPrimitive */](new __WEBPACK_IMPORTED_MODULE_4__ast__["i" /* ParseSpan */](0, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["d" /* isBlank */])(input) ? 0 : input.length), input), input, location, this.errors);
- };
- /**
- * @param {?} input
- * @return {?}
- */
- Parser.prototype._stripComments = function (input) {
- var /** @type {?} */ i = this._commentStart(input);
- return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["c" /* isPresent */])(i) ? input.substring(0, i).trim() : input;
- };
- /**
- * @param {?} input
- * @return {?}
- */
- Parser.prototype._commentStart = function (input) {
- var /** @type {?} */ outerQuote = null;
- for (var /** @type {?} */ i = 0; i < input.length - 1; i++) {
- var /** @type {?} */ char = input.charCodeAt(i);
- var /** @type {?} */ nextChar = input.charCodeAt(i + 1);
- if (char === __WEBPACK_IMPORTED_MODULE_0__chars__["b" /* $SLASH */] && nextChar == __WEBPACK_IMPORTED_MODULE_0__chars__["b" /* $SLASH */] && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["d" /* isBlank */])(outerQuote))
- return i;
- if (outerQuote === char) {
- outerQuote = null;
- }
- else if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["d" /* isBlank */])(outerQuote) && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lexer__["b" /* isQuote */])(char)) {
- outerQuote = char;
- }
- }
- return null;
- };
- /**
- * @param {?} input
- * @param {?} location
- * @param {?} interpolationConfig
- * @return {?}
- */
- Parser.prototype._checkNoInterpolation = function (input, location, interpolationConfig) {
- var /** @type {?} */ regexp = _createInterpolateRegExp(interpolationConfig);
- var /** @type {?} */ parts = input.split(regexp);
- if (parts.length > 1) {
- this._reportError("Got interpolation (" + interpolationConfig.start + interpolationConfig.end + ") where expression was expected", input, "at column " + this._findInterpolationErrorColumn(parts, 1, interpolationConfig) + " in", location);
- }
- };
- /**
- * @param {?} parts
- * @param {?} partInErrIdx
- * @param {?} interpolationConfig
- * @return {?}
- */
- Parser.prototype._findInterpolationErrorColumn = function (parts, partInErrIdx, interpolationConfig) {
- var /** @type {?} */ errLocation = '';
- for (var /** @type {?} */ j = 0; j < partInErrIdx; j++) {
- errLocation += j % 2 === 0 ?
- parts[j] :
- "" + interpolationConfig.start + parts[j] + interpolationConfig.end;
- }
- return errLocation.length;
- };
- Parser = __decorate([
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__injectable__["a" /* CompilerInjectable */])(),
- __metadata('design:paramtypes', [__WEBPACK_IMPORTED_MODULE_5__lexer__["c" /* Lexer */]])
- ], Parser);
- return Parser;
-}());
-function Parser_tsickle_Closure_declarations() {
- /** @type {?} */
- Parser.prototype.errors;
- /** @type {?} */
- Parser.prototype._lexer;
-}
-var _ParseAST = (function () {
- /**
- * @param {?} input
- * @param {?} location
- * @param {?} tokens
- * @param {?} inputLength
- * @param {?} parseAction
- * @param {?} errors
- * @param {?} offset
- */
- function _ParseAST(input, location, tokens, inputLength, parseAction, errors, offset) {
- this.input = input;
- this.location = location;
- this.tokens = tokens;
- this.inputLength = inputLength;
- this.parseAction = parseAction;
- this.errors = errors;
- this.offset = offset;
- this.rparensExpected = 0;
- this.rbracketsExpected = 0;
- this.rbracesExpected = 0;
- this.index = 0;
- }
- /**
- * @param {?} offset
- * @return {?}
- */
- _ParseAST.prototype.peek = function (offset) {
- var /** @type {?} */ i = this.index + offset;
- return i < this.tokens.length ? this.tokens[i] : __WEBPACK_IMPORTED_MODULE_5__lexer__["d" /* EOF */];
- };
- Object.defineProperty(_ParseAST.prototype, "next", {
- /**
- * @return {?}
- */
- get: function () { return this.peek(0); },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(_ParseAST.prototype, "inputIndex", {
- /**
- * @return {?}
- */
- get: function () {
- return (this.index < this.tokens.length) ? this.next.index + this.offset :
- this.inputLength + this.offset;
- },
- enumerable: true,
- configurable: true
- });
- /**
- * @param {?} start
- * @return {?}
- */
- _ParseAST.prototype.span = function (start) { return new __WEBPACK_IMPORTED_MODULE_4__ast__["i" /* ParseSpan */](start, this.inputIndex); };
- /**
- * @return {?}
- */
- _ParseAST.prototype.advance = function () { this.index++; };
- /**
- * @param {?} code
- * @return {?}
- */
- _ParseAST.prototype.optionalCharacter = function (code) {
- if (this.next.isCharacter(code)) {
- this.advance();
- return true;
- }
- else {
- return false;
- }
- };
- /**
- * @return {?}
- */
- _ParseAST.prototype.peekKeywordLet = function () { return this.next.isKeywordLet(); };
- /**
- * @param {?} code
- * @return {?}
- */
- _ParseAST.prototype.expectCharacter = function (code) {
- if (this.optionalCharacter(code))
- return;
- this.error("Missing expected " + String.fromCharCode(code));
- };
- /**
- * @param {?} op
- * @return {?}
- */
- _ParseAST.prototype.optionalOperator = function (op) {
- if (this.next.isOperator(op)) {
- this.advance();
- return true;
- }
- else {
- return false;
- }
- };
- /**
- * @param {?} operator
- * @return {?}
- */
- _ParseAST.prototype.expectOperator = function (operator) {
- if (this.optionalOperator(operator))
- return;
- this.error("Missing expected operator " + operator);
- };
- /**
- * @return {?}
- */
- _ParseAST.prototype.expectIdentifierOrKeyword = function () {
- var /** @type {?} */ n = this.next;
- if (!n.isIdentifier() && !n.isKeyword()) {
- this.error("Unexpected token " + n + ", expected identifier or keyword");
- return '';
- }
- this.advance();
- return n.toString();
- };
- /**
- * @return {?}
- */
- _ParseAST.prototype.expectIdentifierOrKeywordOrString = function () {
- var /** @type {?} */ n = this.next;
- if (!n.isIdentifier() && !n.isKeyword() && !n.isString()) {
- this.error("Unexpected token " + n + ", expected identifier, keyword, or string");
- return '';
- }
- this.advance();
- return n.toString();
- };
- /**
- * @return {?}
- */
- _ParseAST.prototype.parseChain = function () {
- var /** @type {?} */ exprs = [];
- var /** @type {?} */ start = this.inputIndex;
- while (this.index < this.tokens.length) {
- var /** @type {?} */ expr = this.parsePipe();
- exprs.push(expr);
- if (this.optionalCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["c" /* $SEMICOLON */])) {
- if (!this.parseAction) {
- this.error('Binding expression cannot contain chained expression');
- }
- while (this.optionalCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["c" /* $SEMICOLON */])) {
- } // read all semicolons
- }
- else if (this.index < this.tokens.length) {
- this.error("Unexpected token '" + this.next + "'");
- }
- }
- if (exprs.length == 0)
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["d" /* EmptyExpr */](this.span(start));
- if (exprs.length == 1)
- return exprs[0];
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["l" /* Chain */](this.span(start), exprs);
- };
- /**
- * @return {?}
- */
- _ParseAST.prototype.parsePipe = function () {
- var /** @type {?} */ result = this.parseExpression();
- if (this.optionalOperator('|')) {
- if (this.parseAction) {
- this.error('Cannot have a pipe in an action expression');
- }
- do {
- var /** @type {?} */ name_1 = this.expectIdentifierOrKeyword();
- var /** @type {?} */ args = [];
- while (this.optionalCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["d" /* $COLON */])) {
- args.push(this.parseExpression());
- }
- result = new __WEBPACK_IMPORTED_MODULE_4__ast__["m" /* BindingPipe */](this.span(result.span.start), result, name_1, args);
- } while (this.optionalOperator('|'));
- }
- return result;
- };
- /**
- * @return {?}
- */
- _ParseAST.prototype.parseExpression = function () { return this.parseConditional(); };
- /**
- * @return {?}
- */
- _ParseAST.prototype.parseConditional = function () {
- var /** @type {?} */ start = this.inputIndex;
- var /** @type {?} */ result = this.parseLogicalOr();
- if (this.optionalOperator('?')) {
- var /** @type {?} */ yes = this.parsePipe();
- var /** @type {?} */ no = void 0;
- if (!this.optionalCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["d" /* $COLON */])) {
- var /** @type {?} */ end = this.inputIndex;
- var /** @type {?} */ expression = this.input.substring(start, end);
- this.error("Conditional expression " + expression + " requires all 3 expressions");
- no = new __WEBPACK_IMPORTED_MODULE_4__ast__["d" /* EmptyExpr */](this.span(start));
- }
- else {
- no = this.parsePipe();
- }
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["n" /* Conditional */](this.span(start), result, yes, no);
- }
- else {
- return result;
- }
- };
- /**
- * @return {?}
- */
- _ParseAST.prototype.parseLogicalOr = function () {
- // '||'
- var /** @type {?} */ result = this.parseLogicalAnd();
- while (this.optionalOperator('||')) {
- var /** @type {?} */ right = this.parseLogicalAnd();
- result = new __WEBPACK_IMPORTED_MODULE_4__ast__["o" /* Binary */](this.span(result.span.start), '||', result, right);
- }
- return result;
- };
- /**
- * @return {?}
- */
- _ParseAST.prototype.parseLogicalAnd = function () {
- // '&&'
- var /** @type {?} */ result = this.parseEquality();
- while (this.optionalOperator('&&')) {
- var /** @type {?} */ right = this.parseEquality();
- result = new __WEBPACK_IMPORTED_MODULE_4__ast__["o" /* Binary */](this.span(result.span.start), '&&', result, right);
- }
- return result;
- };
- /**
- * @return {?}
- */
- _ParseAST.prototype.parseEquality = function () {
- // '==','!=','===','!=='
- var /** @type {?} */ result = this.parseRelational();
- while (this.next.type == __WEBPACK_IMPORTED_MODULE_5__lexer__["e" /* TokenType */].Operator) {
- var /** @type {?} */ operator = this.next.strValue;
- switch (operator) {
- case '==':
- case '===':
- case '!=':
- case '!==':
- this.advance();
- var /** @type {?} */ right = this.parseRelational();
- result = new __WEBPACK_IMPORTED_MODULE_4__ast__["o" /* Binary */](this.span(result.span.start), operator, result, right);
- continue;
- }
- break;
- }
- return result;
- };
- /**
- * @return {?}
- */
- _ParseAST.prototype.parseRelational = function () {
- // '<', '>', '<=', '>='
- var /** @type {?} */ result = this.parseAdditive();
- while (this.next.type == __WEBPACK_IMPORTED_MODULE_5__lexer__["e" /* TokenType */].Operator) {
- var /** @type {?} */ operator = this.next.strValue;
- switch (operator) {
- case '<':
- case '>':
- case '<=':
- case '>=':
- this.advance();
- var /** @type {?} */ right = this.parseAdditive();
- result = new __WEBPACK_IMPORTED_MODULE_4__ast__["o" /* Binary */](this.span(result.span.start), operator, result, right);
- continue;
- }
- break;
- }
- return result;
- };
- /**
- * @return {?}
- */
- _ParseAST.prototype.parseAdditive = function () {
- // '+', '-'
- var /** @type {?} */ result = this.parseMultiplicative();
- while (this.next.type == __WEBPACK_IMPORTED_MODULE_5__lexer__["e" /* TokenType */].Operator) {
- var /** @type {?} */ operator = this.next.strValue;
- switch (operator) {
- case '+':
- case '-':
- this.advance();
- var /** @type {?} */ right = this.parseMultiplicative();
- result = new __WEBPACK_IMPORTED_MODULE_4__ast__["o" /* Binary */](this.span(result.span.start), operator, result, right);
- continue;
- }
- break;
- }
- return result;
- };
- /**
- * @return {?}
- */
- _ParseAST.prototype.parseMultiplicative = function () {
- // '*', '%', '/'
- var /** @type {?} */ result = this.parsePrefix();
- while (this.next.type == __WEBPACK_IMPORTED_MODULE_5__lexer__["e" /* TokenType */].Operator) {
- var /** @type {?} */ operator = this.next.strValue;
- switch (operator) {
- case '*':
- case '%':
- case '/':
- this.advance();
- var /** @type {?} */ right = this.parsePrefix();
- result = new __WEBPACK_IMPORTED_MODULE_4__ast__["o" /* Binary */](this.span(result.span.start), operator, result, right);
- continue;
- }
- break;
- }
- return result;
- };
- /**
- * @return {?}
- */
- _ParseAST.prototype.parsePrefix = function () {
- if (this.next.type == __WEBPACK_IMPORTED_MODULE_5__lexer__["e" /* TokenType */].Operator) {
- var /** @type {?} */ start = this.inputIndex;
- var /** @type {?} */ operator = this.next.strValue;
- var /** @type {?} */ result = void 0;
- switch (operator) {
- case '+':
- this.advance();
- return this.parsePrefix();
- case '-':
- this.advance();
- result = this.parsePrefix();
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["o" /* Binary */](this.span(start), operator, new __WEBPACK_IMPORTED_MODULE_4__ast__["k" /* LiteralPrimitive */](new __WEBPACK_IMPORTED_MODULE_4__ast__["i" /* ParseSpan */](start, start), 0), result);
- case '!':
- this.advance();
- result = this.parsePrefix();
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["p" /* PrefixNot */](this.span(start), result);
- }
- }
- return this.parseCallChain();
- };
- /**
- * @return {?}
- */
- _ParseAST.prototype.parseCallChain = function () {
- var /** @type {?} */ result = this.parsePrimary();
- while (true) {
- if (this.optionalCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["e" /* $PERIOD */])) {
- result = this.parseAccessMemberOrMethodCall(result, false);
- }
- else if (this.optionalOperator('?.')) {
- result = this.parseAccessMemberOrMethodCall(result, true);
- }
- else if (this.optionalCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["f" /* $LBRACKET */])) {
- this.rbracketsExpected++;
- var /** @type {?} */ key = this.parsePipe();
- this.rbracketsExpected--;
- this.expectCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["g" /* $RBRACKET */]);
- if (this.optionalOperator('=')) {
- var /** @type {?} */ value = this.parseConditional();
- result = new __WEBPACK_IMPORTED_MODULE_4__ast__["q" /* KeyedWrite */](this.span(result.span.start), result, key, value);
- }
- else {
- result = new __WEBPACK_IMPORTED_MODULE_4__ast__["r" /* KeyedRead */](this.span(result.span.start), result, key);
- }
- }
- else if (this.optionalCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["h" /* $LPAREN */])) {
- this.rparensExpected++;
- var /** @type {?} */ args = this.parseCallArguments();
- this.rparensExpected--;
- this.expectCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["i" /* $RPAREN */]);
- result = new __WEBPACK_IMPORTED_MODULE_4__ast__["s" /* FunctionCall */](this.span(result.span.start), result, args);
- }
- else {
- return result;
- }
- }
- };
- /**
- * @return {?}
- */
- _ParseAST.prototype.parsePrimary = function () {
- var /** @type {?} */ start = this.inputIndex;
- if (this.optionalCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["h" /* $LPAREN */])) {
- this.rparensExpected++;
- var /** @type {?} */ result = this.parsePipe();
- this.rparensExpected--;
- this.expectCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["i" /* $RPAREN */]);
- return result;
- }
- else if (this.next.isKeywordNull()) {
- this.advance();
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["k" /* LiteralPrimitive */](this.span(start), null);
- }
- else if (this.next.isKeywordUndefined()) {
- this.advance();
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["k" /* LiteralPrimitive */](this.span(start), void 0);
- }
- else if (this.next.isKeywordTrue()) {
- this.advance();
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["k" /* LiteralPrimitive */](this.span(start), true);
- }
- else if (this.next.isKeywordFalse()) {
- this.advance();
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["k" /* LiteralPrimitive */](this.span(start), false);
- }
- else if (this.next.isKeywordThis()) {
- this.advance();
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["t" /* ImplicitReceiver */](this.span(start));
- }
- else if (this.optionalCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["f" /* $LBRACKET */])) {
- this.rbracketsExpected++;
- var /** @type {?} */ elements = this.parseExpressionList(__WEBPACK_IMPORTED_MODULE_0__chars__["g" /* $RBRACKET */]);
- this.rbracketsExpected--;
- this.expectCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["g" /* $RBRACKET */]);
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["u" /* LiteralArray */](this.span(start), elements);
- }
- else if (this.next.isCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["j" /* $LBRACE */])) {
- return this.parseLiteralMap();
- }
- else if (this.next.isIdentifier()) {
- return this.parseAccessMemberOrMethodCall(new __WEBPACK_IMPORTED_MODULE_4__ast__["t" /* ImplicitReceiver */](this.span(start)), false);
- }
- else if (this.next.isNumber()) {
- var /** @type {?} */ value = this.next.toNumber();
- this.advance();
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["k" /* LiteralPrimitive */](this.span(start), value);
- }
- else if (this.next.isString()) {
- var /** @type {?} */ literalValue = this.next.toString();
- this.advance();
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["k" /* LiteralPrimitive */](this.span(start), literalValue);
- }
- else if (this.index >= this.tokens.length) {
- this.error("Unexpected end of expression: " + this.input);
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["d" /* EmptyExpr */](this.span(start));
- }
- else {
- this.error("Unexpected token " + this.next);
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["d" /* EmptyExpr */](this.span(start));
- }
- };
- /**
- * @param {?} terminator
- * @return {?}
- */
- _ParseAST.prototype.parseExpressionList = function (terminator) {
- var /** @type {?} */ result = [];
- if (!this.next.isCharacter(terminator)) {
- do {
- result.push(this.parsePipe());
- } while (this.optionalCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["k" /* $COMMA */]));
- }
- return result;
- };
- /**
- * @return {?}
- */
- _ParseAST.prototype.parseLiteralMap = function () {
- var /** @type {?} */ keys = [];
- var /** @type {?} */ values = [];
- var /** @type {?} */ start = this.inputIndex;
- this.expectCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["j" /* $LBRACE */]);
- if (!this.optionalCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["l" /* $RBRACE */])) {
- this.rbracesExpected++;
- do {
- var /** @type {?} */ key = this.expectIdentifierOrKeywordOrString();
- keys.push(key);
- this.expectCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["d" /* $COLON */]);
- values.push(this.parsePipe());
- } while (this.optionalCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["k" /* $COMMA */]));
- this.rbracesExpected--;
- this.expectCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["l" /* $RBRACE */]);
- }
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["v" /* LiteralMap */](this.span(start), keys, values);
- };
- /**
- * @param {?} receiver
- * @param {?=} isSafe
- * @return {?}
- */
- _ParseAST.prototype.parseAccessMemberOrMethodCall = function (receiver, isSafe) {
- if (isSafe === void 0) { isSafe = false; }
- var /** @type {?} */ start = receiver.span.start;
- var /** @type {?} */ id = this.expectIdentifierOrKeyword();
- if (this.optionalCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["h" /* $LPAREN */])) {
- this.rparensExpected++;
- var /** @type {?} */ args = this.parseCallArguments();
- this.expectCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["i" /* $RPAREN */]);
- this.rparensExpected--;
- var /** @type {?} */ span = this.span(start);
- return isSafe ? new __WEBPACK_IMPORTED_MODULE_4__ast__["a" /* SafeMethodCall */](span, receiver, id, args) :
- new __WEBPACK_IMPORTED_MODULE_4__ast__["b" /* MethodCall */](span, receiver, id, args);
- }
- else {
- if (isSafe) {
- if (this.optionalOperator('=')) {
- this.error('The \'?.\' operator cannot be used in the assignment');
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["d" /* EmptyExpr */](this.span(start));
- }
- else {
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["w" /* SafePropertyRead */](this.span(start), receiver, id);
- }
- }
- else {
- if (this.optionalOperator('=')) {
- if (!this.parseAction) {
- this.error('Bindings cannot contain assignments');
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["d" /* EmptyExpr */](this.span(start));
- }
- var /** @type {?} */ value = this.parseConditional();
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["x" /* PropertyWrite */](this.span(start), receiver, id, value);
- }
- else {
- return new __WEBPACK_IMPORTED_MODULE_4__ast__["c" /* PropertyRead */](this.span(start), receiver, id);
- }
- }
- }
- };
- /**
- * @return {?}
- */
- _ParseAST.prototype.parseCallArguments = function () {
- if (this.next.isCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["i" /* $RPAREN */]))
- return [];
- var /** @type {?} */ positionals = [];
- do {
- positionals.push(this.parsePipe());
- } while (this.optionalCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["k" /* $COMMA */]));
- return (positionals);
- };
- /**
- * An identifier, a keyword, a string with an optional `-` inbetween.
- * @return {?}
- */
- _ParseAST.prototype.expectTemplateBindingKey = function () {
- var /** @type {?} */ result = '';
- var /** @type {?} */ operatorFound = false;
- do {
- result += this.expectIdentifierOrKeywordOrString();
- operatorFound = this.optionalOperator('-');
- if (operatorFound) {
- result += '-';
- }
- } while (operatorFound);
- return result.toString();
- };
- /**
- * @return {?}
- */
- _ParseAST.prototype.parseTemplateBindings = function () {
- var /** @type {?} */ bindings = [];
- var /** @type {?} */ prefix = null;
- var /** @type {?} */ warnings = [];
- while (this.index < this.tokens.length) {
- var /** @type {?} */ start = this.inputIndex;
- var /** @type {?} */ keyIsVar = this.peekKeywordLet();
- if (keyIsVar) {
- this.advance();
- }
- var /** @type {?} */ key = this.expectTemplateBindingKey();
- if (!keyIsVar) {
- if (prefix == null) {
- prefix = key;
- }
- else {
- key = prefix + key[0].toUpperCase() + key.substring(1);
- }
- }
- this.optionalCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["d" /* $COLON */]);
- var /** @type {?} */ name_2 = null;
- var /** @type {?} */ expression = null;
- if (keyIsVar) {
- if (this.optionalOperator('=')) {
- name_2 = this.expectTemplateBindingKey();
- }
- else {
- name_2 = '\$implicit';
- }
- }
- else if (this.next !== __WEBPACK_IMPORTED_MODULE_5__lexer__["d" /* EOF */] && !this.peekKeywordLet()) {
- var /** @type {?} */ start_1 = this.inputIndex;
- var /** @type {?} */ ast = this.parsePipe();
- var /** @type {?} */ source = this.input.substring(start_1 - this.offset, this.inputIndex - this.offset);
- expression = new __WEBPACK_IMPORTED_MODULE_4__ast__["f" /* ASTWithSource */](ast, source, this.location, this.errors);
- }
- bindings.push(new __WEBPACK_IMPORTED_MODULE_4__ast__["y" /* TemplateBinding */](this.span(start), key, keyIsVar, name_2, expression));
- if (!this.optionalCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["c" /* $SEMICOLON */])) {
- this.optionalCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["k" /* $COMMA */]);
- }
- }
- return new TemplateBindingParseResult(bindings, warnings, this.errors);
- };
- /**
- * @param {?} message
- * @param {?=} index
- * @return {?}
- */
- _ParseAST.prototype.error = function (message, index) {
- if (index === void 0) { index = null; }
- this.errors.push(new __WEBPACK_IMPORTED_MODULE_4__ast__["g" /* ParserError */](message, this.input, this.locationText(index), this.location));
- this.skip();
- };
- /**
- * @param {?=} index
- * @return {?}
- */
- _ParseAST.prototype.locationText = function (index) {
- if (index === void 0) { index = null; }
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["d" /* isBlank */])(index))
- index = this.index;
- return (index < this.tokens.length) ? "at column " + (this.tokens[index].index + 1) + " in" :
- "at the end of the expression";
- };
- /**
- * @return {?}
- */
- _ParseAST.prototype.skip = function () {
- var /** @type {?} */ n = this.next;
- while (this.index < this.tokens.length && !n.isCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["c" /* $SEMICOLON */]) &&
- (this.rparensExpected <= 0 || !n.isCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["i" /* $RPAREN */])) &&
- (this.rbracesExpected <= 0 || !n.isCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["l" /* $RBRACE */])) &&
- (this.rbracketsExpected <= 0 || !n.isCharacter(__WEBPACK_IMPORTED_MODULE_0__chars__["g" /* $RBRACKET */]))) {
- if (this.next.isError()) {
- this.errors.push(new __WEBPACK_IMPORTED_MODULE_4__ast__["g" /* ParserError */](this.next.toString(), this.input, this.locationText(), this.location));
- }
- this.advance();
- n = this.next;
- }
- };
- return _ParseAST;
-}());
-function _ParseAST_tsickle_Closure_declarations() {
- /** @type {?} */
- _ParseAST.prototype.rparensExpected;
- /** @type {?} */
- _ParseAST.prototype.rbracketsExpected;
- /** @type {?} */
- _ParseAST.prototype.rbracesExpected;
- /** @type {?} */
- _ParseAST.prototype.index;
- /** @type {?} */
- _ParseAST.prototype.input;
- /** @type {?} */
- _ParseAST.prototype.location;
- /** @type {?} */
- _ParseAST.prototype.tokens;
- /** @type {?} */
- _ParseAST.prototype.inputLength;
- /** @type {?} */
- _ParseAST.prototype.parseAction;
- /** @type {?} */
- _ParseAST.prototype.errors;
- /** @type {?} */
- _ParseAST.prototype.offset;
-}
-var SimpleExpressionChecker = (function () {
- function SimpleExpressionChecker() {
- this.errors = [];
- }
- /**
- * @param {?} ast
- * @return {?}
- */
- SimpleExpressionChecker.check = function (ast) {
- var /** @type {?} */ s = new SimpleExpressionChecker();
- ast.visit(s);
- return s.errors;
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- SimpleExpressionChecker.prototype.visitImplicitReceiver = function (ast, context) { };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- SimpleExpressionChecker.prototype.visitInterpolation = function (ast, context) { };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- SimpleExpressionChecker.prototype.visitLiteralPrimitive = function (ast, context) { };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- SimpleExpressionChecker.prototype.visitPropertyRead = function (ast, context) { };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- SimpleExpressionChecker.prototype.visitPropertyWrite = function (ast, context) { };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- SimpleExpressionChecker.prototype.visitSafePropertyRead = function (ast, context) { };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- SimpleExpressionChecker.prototype.visitMethodCall = function (ast, context) { };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- SimpleExpressionChecker.prototype.visitSafeMethodCall = function (ast, context) { };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- SimpleExpressionChecker.prototype.visitFunctionCall = function (ast, context) { };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- SimpleExpressionChecker.prototype.visitLiteralArray = function (ast, context) { this.visitAll(ast.expressions); };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- SimpleExpressionChecker.prototype.visitLiteralMap = function (ast, context) { this.visitAll(ast.values); };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- SimpleExpressionChecker.prototype.visitBinary = function (ast, context) { };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- SimpleExpressionChecker.prototype.visitPrefixNot = function (ast, context) { };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- SimpleExpressionChecker.prototype.visitConditional = function (ast, context) { };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- SimpleExpressionChecker.prototype.visitPipe = function (ast, context) { this.errors.push('pipes'); };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- SimpleExpressionChecker.prototype.visitKeyedRead = function (ast, context) { };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- SimpleExpressionChecker.prototype.visitKeyedWrite = function (ast, context) { };
- /**
- * @param {?} asts
- * @return {?}
- */
- SimpleExpressionChecker.prototype.visitAll = function (asts) {
- var _this = this;
- return asts.map(function (node) { return node.visit(_this); });
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- SimpleExpressionChecker.prototype.visitChain = function (ast, context) { };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- SimpleExpressionChecker.prototype.visitQuote = function (ast, context) { };
- return SimpleExpressionChecker;
-}());
-function SimpleExpressionChecker_tsickle_Closure_declarations() {
- /** @type {?} */
- SimpleExpressionChecker.prototype.errors;
-}
-//# sourceMappingURL=parser.js.map
-
-/***/ }),
-/* 92 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__facade_lang__ = __webpack_require__(6);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__parse_util__ = __webpack_require__(38);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ast__ = __webpack_require__(68);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__interpolation_config__ = __webpack_require__(46);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__lexer__ = __webpack_require__(559);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__tags__ = __webpack_require__(80);
-/* unused harmony export TreeError */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ParseTreeResult; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Parser; });
-/**
- * @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 = (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 TreeError = (function (_super) {
- __extends(TreeError, _super);
- /**
- * @param {?} elementName
- * @param {?} span
- * @param {?} msg
- */
- function TreeError(elementName, span, msg) {
- _super.call(this, span, msg);
- this.elementName = elementName;
- }
- /**
- * @param {?} elementName
- * @param {?} span
- * @param {?} msg
- * @return {?}
- */
- TreeError.create = function (elementName, span, msg) {
- return new TreeError(elementName, span, msg);
- };
- return TreeError;
-}(__WEBPACK_IMPORTED_MODULE_1__parse_util__["a" /* ParseError */]));
-function TreeError_tsickle_Closure_declarations() {
- /** @type {?} */
- TreeError.prototype.elementName;
-}
-var ParseTreeResult = (function () {
- /**
- * @param {?} rootNodes
- * @param {?} errors
- */
- function ParseTreeResult(rootNodes, errors) {
- this.rootNodes = rootNodes;
- this.errors = errors;
- }
- return ParseTreeResult;
-}());
-function ParseTreeResult_tsickle_Closure_declarations() {
- /** @type {?} */
- ParseTreeResult.prototype.rootNodes;
- /** @type {?} */
- ParseTreeResult.prototype.errors;
-}
-var Parser = (function () {
- /**
- * @param {?} getTagDefinition
- */
- function Parser(getTagDefinition) {
- this.getTagDefinition = getTagDefinition;
- }
- /**
- * @param {?} source
- * @param {?} url
- * @param {?=} parseExpansionForms
- * @param {?=} interpolationConfig
- * @return {?}
- */
- Parser.prototype.parse = function (source, url, parseExpansionForms, interpolationConfig) {
- if (parseExpansionForms === void 0) { parseExpansionForms = false; }
- if (interpolationConfig === void 0) { interpolationConfig = __WEBPACK_IMPORTED_MODULE_3__interpolation_config__["a" /* DEFAULT_INTERPOLATION_CONFIG */]; }
- var /** @type {?} */ tokensAndErrors = __WEBPACK_IMPORTED_MODULE_4__lexer__["a" /* tokenize */](source, url, this.getTagDefinition, parseExpansionForms, interpolationConfig);
- var /** @type {?} */ treeAndErrors = new _TreeBuilder(tokensAndErrors.tokens, this.getTagDefinition).build();
- return new ParseTreeResult(treeAndErrors.rootNodes, ((tokensAndErrors.errors)).concat(treeAndErrors.errors));
- };
- return Parser;
-}());
-function Parser_tsickle_Closure_declarations() {
- /** @type {?} */
- Parser.prototype.getTagDefinition;
-}
-var _TreeBuilder = (function () {
- /**
- * @param {?} tokens
- * @param {?} getTagDefinition
- */
- function _TreeBuilder(tokens, getTagDefinition) {
- this.tokens = tokens;
- this.getTagDefinition = getTagDefinition;
- this._index = -1;
- this._rootNodes = [];
- this._errors = [];
- this._elementStack = [];
- this._advance();
- }
- /**
- * @return {?}
- */
- _TreeBuilder.prototype.build = function () {
- while (this._peek.type !== __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].EOF) {
- if (this._peek.type === __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].TAG_OPEN_START) {
- this._consumeStartTag(this._advance());
- }
- else if (this._peek.type === __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].TAG_CLOSE) {
- this._consumeEndTag(this._advance());
- }
- else if (this._peek.type === __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].CDATA_START) {
- this._closeVoidElement();
- this._consumeCdata(this._advance());
- }
- else if (this._peek.type === __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].COMMENT_START) {
- this._closeVoidElement();
- this._consumeComment(this._advance());
- }
- else if (this._peek.type === __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].TEXT || this._peek.type === __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].RAW_TEXT ||
- this._peek.type === __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].ESCAPABLE_RAW_TEXT) {
- this._closeVoidElement();
- this._consumeText(this._advance());
- }
- else if (this._peek.type === __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].EXPANSION_FORM_START) {
- this._consumeExpansion(this._advance());
- }
- else {
- // Skip all other tokens...
- this._advance();
- }
- }
- return new ParseTreeResult(this._rootNodes, this._errors);
- };
- /**
- * @return {?}
- */
- _TreeBuilder.prototype._advance = function () {
- var /** @type {?} */ prev = this._peek;
- if (this._index < this.tokens.length - 1) {
- // Note: there is always an EOF token at the end
- this._index++;
- }
- this._peek = this.tokens[this._index];
- return prev;
- };
- /**
- * @param {?} type
- * @return {?}
- */
- _TreeBuilder.prototype._advanceIf = function (type) {
- if (this._peek.type === type) {
- return this._advance();
- }
- return null;
- };
- /**
- * @param {?} startToken
- * @return {?}
- */
- _TreeBuilder.prototype._consumeCdata = function (startToken) {
- this._consumeText(this._advance());
- this._advanceIf(__WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].CDATA_END);
- };
- /**
- * @param {?} token
- * @return {?}
- */
- _TreeBuilder.prototype._consumeComment = function (token) {
- var /** @type {?} */ text = this._advanceIf(__WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].RAW_TEXT);
- this._advanceIf(__WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].COMMENT_END);
- var /** @type {?} */ value = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__facade_lang__["c" /* isPresent */])(text) ? text.parts[0].trim() : null;
- this._addToParent(new __WEBPACK_IMPORTED_MODULE_2__ast__["a" /* Comment */](value, token.sourceSpan));
- };
- /**
- * @param {?} token
- * @return {?}
- */
- _TreeBuilder.prototype._consumeExpansion = function (token) {
- var /** @type {?} */ switchValue = this._advance();
- var /** @type {?} */ type = this._advance();
- var /** @type {?} */ cases = [];
- // read =
- while (this._peek.type === __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].EXPANSION_CASE_VALUE) {
- var /** @type {?} */ expCase = this._parseExpansionCase();
- if (!expCase)
- return; // error
- cases.push(expCase);
- }
- // read the final }
- if (this._peek.type !== __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].EXPANSION_FORM_END) {
- this._errors.push(TreeError.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '}'."));
- return;
- }
- var /** @type {?} */ sourceSpan = new __WEBPACK_IMPORTED_MODULE_1__parse_util__["c" /* ParseSourceSpan */](token.sourceSpan.start, this._peek.sourceSpan.end);
- this._addToParent(new __WEBPACK_IMPORTED_MODULE_2__ast__["b" /* Expansion */](switchValue.parts[0], type.parts[0], cases, sourceSpan, switchValue.sourceSpan));
- this._advance();
- };
- /**
- * @return {?}
- */
- _TreeBuilder.prototype._parseExpansionCase = function () {
- var /** @type {?} */ value = this._advance();
- // read {
- if (this._peek.type !== __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].EXPANSION_CASE_EXP_START) {
- this._errors.push(TreeError.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '{'."));
- return null;
- }
- // read until }
- var /** @type {?} */ start = this._advance();
- var /** @type {?} */ exp = this._collectExpansionExpTokens(start);
- if (!exp)
- return null;
- var /** @type {?} */ end = this._advance();
- exp.push(new __WEBPACK_IMPORTED_MODULE_4__lexer__["c" /* Token */](__WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].EOF, [], end.sourceSpan));
- // parse everything in between { and }
- var /** @type {?} */ parsedExp = new _TreeBuilder(exp, this.getTagDefinition).build();
- if (parsedExp.errors.length > 0) {
- this._errors = this._errors.concat(/** @type {?} */ (parsedExp.errors));
- return null;
- }
- var /** @type {?} */ sourceSpan = new __WEBPACK_IMPORTED_MODULE_1__parse_util__["c" /* ParseSourceSpan */](value.sourceSpan.start, end.sourceSpan.end);
- var /** @type {?} */ expSourceSpan = new __WEBPACK_IMPORTED_MODULE_1__parse_util__["c" /* ParseSourceSpan */](start.sourceSpan.start, end.sourceSpan.end);
- return new __WEBPACK_IMPORTED_MODULE_2__ast__["c" /* ExpansionCase */](value.parts[0], parsedExp.rootNodes, sourceSpan, value.sourceSpan, expSourceSpan);
- };
- /**
- * @param {?} start
- * @return {?}
- */
- _TreeBuilder.prototype._collectExpansionExpTokens = function (start) {
- var /** @type {?} */ exp = [];
- var /** @type {?} */ expansionFormStack = [__WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].EXPANSION_CASE_EXP_START];
- while (true) {
- if (this._peek.type === __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].EXPANSION_FORM_START ||
- this._peek.type === __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].EXPANSION_CASE_EXP_START) {
- expansionFormStack.push(this._peek.type);
- }
- if (this._peek.type === __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].EXPANSION_CASE_EXP_END) {
- if (lastOnStack(expansionFormStack, __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].EXPANSION_CASE_EXP_START)) {
- expansionFormStack.pop();
- if (expansionFormStack.length == 0)
- return exp;
- }
- else {
- this._errors.push(TreeError.create(null, start.sourceSpan, "Invalid ICU message. Missing '}'."));
- return null;
- }
- }
- if (this._peek.type === __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].EXPANSION_FORM_END) {
- if (lastOnStack(expansionFormStack, __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].EXPANSION_FORM_START)) {
- expansionFormStack.pop();
- }
- else {
- this._errors.push(TreeError.create(null, start.sourceSpan, "Invalid ICU message. Missing '}'."));
- return null;
- }
- }
- if (this._peek.type === __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].EOF) {
- this._errors.push(TreeError.create(null, start.sourceSpan, "Invalid ICU message. Missing '}'."));
- return null;
- }
- exp.push(this._advance());
- }
- };
- /**
- * @param {?} token
- * @return {?}
- */
- _TreeBuilder.prototype._consumeText = function (token) {
- var /** @type {?} */ text = token.parts[0];
- if (text.length > 0 && text[0] == '\n') {
- var /** @type {?} */ parent_1 = this._getParentElement();
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__facade_lang__["c" /* isPresent */])(parent_1) && parent_1.children.length == 0 &&
- this.getTagDefinition(parent_1.name).ignoreFirstLf) {
- text = text.substring(1);
- }
- }
- if (text.length > 0) {
- this._addToParent(new __WEBPACK_IMPORTED_MODULE_2__ast__["d" /* Text */](text, token.sourceSpan));
- }
- };
- /**
- * @return {?}
- */
- _TreeBuilder.prototype._closeVoidElement = function () {
- if (this._elementStack.length > 0) {
- var /** @type {?} */ el = this._elementStack[this._elementStack.length - 1];
- if (this.getTagDefinition(el.name).isVoid) {
- this._elementStack.pop();
- }
- }
- };
- /**
- * @param {?} startTagToken
- * @return {?}
- */
- _TreeBuilder.prototype._consumeStartTag = function (startTagToken) {
- var /** @type {?} */ prefix = startTagToken.parts[0];
- var /** @type {?} */ name = startTagToken.parts[1];
- var /** @type {?} */ attrs = [];
- while (this._peek.type === __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].ATTR_NAME) {
- attrs.push(this._consumeAttr(this._advance()));
- }
- var /** @type {?} */ fullName = this._getElementFullName(prefix, name, this._getParentElement());
- var /** @type {?} */ selfClosing = false;
- // Note: There could have been a tokenizer error
- // so that we don't get a token for the end tag...
- if (this._peek.type === __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].TAG_OPEN_END_VOID) {
- this._advance();
- selfClosing = true;
- var /** @type {?} */ tagDef = this.getTagDefinition(fullName);
- if (!(tagDef.canSelfClose || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__tags__["c" /* getNsPrefix */])(fullName) !== null || tagDef.isVoid)) {
- this._errors.push(TreeError.create(fullName, startTagToken.sourceSpan, "Only void and foreign elements can be self closed \"" + startTagToken.parts[1] + "\""));
- }
- }
- else if (this._peek.type === __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].TAG_OPEN_END) {
- this._advance();
- selfClosing = false;
- }
- var /** @type {?} */ end = this._peek.sourceSpan.start;
- var /** @type {?} */ span = new __WEBPACK_IMPORTED_MODULE_1__parse_util__["c" /* ParseSourceSpan */](startTagToken.sourceSpan.start, end);
- var /** @type {?} */ el = new __WEBPACK_IMPORTED_MODULE_2__ast__["e" /* Element */](fullName, attrs, [], span, span, null);
- this._pushElement(el);
- if (selfClosing) {
- this._popElement(fullName);
- el.endSourceSpan = span;
- }
- };
- /**
- * @param {?} el
- * @return {?}
- */
- _TreeBuilder.prototype._pushElement = function (el) {
- if (this._elementStack.length > 0) {
- var /** @type {?} */ parentEl = this._elementStack[this._elementStack.length - 1];
- if (this.getTagDefinition(parentEl.name).isClosedByChild(el.name)) {
- this._elementStack.pop();
- }
- }
- var /** @type {?} */ tagDef = this.getTagDefinition(el.name);
- var _a = this._getParentElementSkippingContainers(), parent = _a.parent, container = _a.container;
- if (parent && tagDef.requireExtraParent(parent.name)) {
- var /** @type {?} */ newParent = new __WEBPACK_IMPORTED_MODULE_2__ast__["e" /* Element */](tagDef.parentToAdd, [], [], el.sourceSpan, el.startSourceSpan, el.endSourceSpan);
- this._insertBeforeContainer(parent, container, newParent);
- }
- this._addToParent(el);
- this._elementStack.push(el);
- };
- /**
- * @param {?} endTagToken
- * @return {?}
- */
- _TreeBuilder.prototype._consumeEndTag = function (endTagToken) {
- var /** @type {?} */ fullName = this._getElementFullName(endTagToken.parts[0], endTagToken.parts[1], this._getParentElement());
- if (this._getParentElement()) {
- this._getParentElement().endSourceSpan = endTagToken.sourceSpan;
- }
- if (this.getTagDefinition(fullName).isVoid) {
- this._errors.push(TreeError.create(fullName, endTagToken.sourceSpan, "Void elements do not have end tags \"" + endTagToken.parts[1] + "\""));
- }
- else if (!this._popElement(fullName)) {
- this._errors.push(TreeError.create(fullName, endTagToken.sourceSpan, "Unexpected closing tag \"" + endTagToken.parts[1] + "\""));
- }
- };
- /**
- * @param {?} fullName
- * @return {?}
- */
- _TreeBuilder.prototype._popElement = function (fullName) {
- for (var /** @type {?} */ stackIndex = this._elementStack.length - 1; stackIndex >= 0; stackIndex--) {
- var /** @type {?} */ el = this._elementStack[stackIndex];
- if (el.name == fullName) {
- this._elementStack.splice(stackIndex, this._elementStack.length - stackIndex);
- return true;
- }
- if (!this.getTagDefinition(el.name).closedByParent) {
- return false;
- }
- }
- return false;
- };
- /**
- * @param {?} attrName
- * @return {?}
- */
- _TreeBuilder.prototype._consumeAttr = function (attrName) {
- var /** @type {?} */ fullName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__tags__["b" /* mergeNsAndName */])(attrName.parts[0], attrName.parts[1]);
- var /** @type {?} */ end = attrName.sourceSpan.end;
- var /** @type {?} */ value = '';
- var /** @type {?} */ valueSpan;
- if (this._peek.type === __WEBPACK_IMPORTED_MODULE_4__lexer__["b" /* TokenType */].ATTR_VALUE) {
- var /** @type {?} */ valueToken = this._advance();
- value = valueToken.parts[0];
- end = valueToken.sourceSpan.end;
- valueSpan = valueToken.sourceSpan;
- }
- return new __WEBPACK_IMPORTED_MODULE_2__ast__["f" /* Attribute */](fullName, value, new __WEBPACK_IMPORTED_MODULE_1__parse_util__["c" /* ParseSourceSpan */](attrName.sourceSpan.start, end), valueSpan);
- };
- /**
- * @return {?}
- */
- _TreeBuilder.prototype._getParentElement = function () {
- return this._elementStack.length > 0 ? this._elementStack[this._elementStack.length - 1] : null;
- };
- /**
- * Returns the parent in the DOM and the container.
- *
- * `` elements are skipped as they are not rendered as DOM element.
- * @return {?}
- */
- _TreeBuilder.prototype._getParentElementSkippingContainers = function () {
- var /** @type {?} */ container = null;
- for (var /** @type {?} */ i = this._elementStack.length - 1; i >= 0; i--) {
- if (this._elementStack[i].name !== 'ng-container') {
- return { parent: this._elementStack[i], container: container };
- }
- container = this._elementStack[i];
- }
- return { parent: this._elementStack[this._elementStack.length - 1], container: container };
- };
- /**
- * @param {?} node
- * @return {?}
- */
- _TreeBuilder.prototype._addToParent = function (node) {
- var /** @type {?} */ parent = this._getParentElement();
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__facade_lang__["c" /* isPresent */])(parent)) {
- parent.children.push(node);
- }
- else {
- this._rootNodes.push(node);
- }
- };
- /**
- * Insert a node between the parent and the container.
- * When no container is given, the node is appended as a child of the parent.
- * Also updates the element stack accordingly.
- *
- * \@internal
- * @param {?} parent
- * @param {?} container
- * @param {?} node
- * @return {?}
- */
- _TreeBuilder.prototype._insertBeforeContainer = function (parent, container, node) {
- if (!container) {
- this._addToParent(node);
- this._elementStack.push(node);
- }
- else {
- if (parent) {
- // replace the container with the new node in the children
- var /** @type {?} */ index = parent.children.indexOf(container);
- parent.children[index] = node;
- }
- else {
- this._rootNodes.push(node);
- }
- node.children.push(container);
- this._elementStack.splice(this._elementStack.indexOf(container), 0, node);
- }
- };
- /**
- * @param {?} prefix
- * @param {?} localName
- * @param {?} parentElement
- * @return {?}
- */
- _TreeBuilder.prototype._getElementFullName = function (prefix, localName, parentElement) {
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__facade_lang__["d" /* isBlank */])(prefix)) {
- prefix = this.getTagDefinition(localName).implicitNamespacePrefix;
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__facade_lang__["d" /* isBlank */])(prefix) && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__facade_lang__["c" /* isPresent */])(parentElement)) {
- prefix = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__tags__["c" /* getNsPrefix */])(parentElement.name);
- }
- }
- return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__tags__["b" /* mergeNsAndName */])(prefix, localName);
- };
- return _TreeBuilder;
-}());
-function _TreeBuilder_tsickle_Closure_declarations() {
- /** @type {?} */
- _TreeBuilder.prototype._index;
- /** @type {?} */
- _TreeBuilder.prototype._peek;
- /** @type {?} */
- _TreeBuilder.prototype._rootNodes;
- /** @type {?} */
- _TreeBuilder.prototype._errors;
- /** @type {?} */
- _TreeBuilder.prototype._elementStack;
- /** @type {?} */
- _TreeBuilder.prototype.tokens;
- /** @type {?} */
- _TreeBuilder.prototype.getTagDefinition;
-}
-/**
- * @param {?} stack
- * @param {?} element
- * @return {?}
- */
-function lastOnStack(stack, element) {
- return stack.length > 0 && stack[stack.length - 1] === element;
-}
-//# sourceMappingURL=parser.js.map
-
-/***/ }),
-/* 93 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_decorators__ = __webpack_require__(94);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return Inject; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return Optional; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Injectable; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Self; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return SkipSelf; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return Host; });
-/**
- * @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
- */
-
-/**
- * Inject decorator and metadata.
- *
- * @stable
- * @Annotation
- */
-var /** @type {?} */ Inject = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_decorators__["b" /* makeParamDecorator */])('Inject', [['token', undefined]]);
-/**
- * Optional decorator and metadata.
- *
- * @stable
- * @Annotation
- */
-var /** @type {?} */ Optional = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_decorators__["b" /* makeParamDecorator */])('Optional', []);
-/**
- * Injectable decorator and metadata.
- *
- * @stable
- * @Annotation
- */
-var /** @type {?} */ Injectable = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_decorators__["a" /* makeDecorator */])('Injectable', []));
-/**
- * Self decorator and metadata.
- *
- * @stable
- * @Annotation
- */
-var /** @type {?} */ Self = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_decorators__["b" /* makeParamDecorator */])('Self', []);
-/**
- * SkipSelf decorator and metadata.
- *
- * @stable
- * @Annotation
- */
-var /** @type {?} */ SkipSelf = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_decorators__["b" /* makeParamDecorator */])('SkipSelf', []);
-/**
- * Host decorator and metadata.
- *
- * @stable
- * @Annotation
- */
-var /** @type {?} */ Host = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_decorators__["b" /* makeParamDecorator */])('Host', []);
-//# sourceMappingURL=metadata.js.map
-
-/***/ }),
-/* 94 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__facade_lang__ = __webpack_require__(7);
-/* unused harmony export Class */
-/* harmony export (immutable) */ __webpack_exports__["a"] = makeDecorator;
-/* harmony export (immutable) */ __webpack_exports__["b"] = makeParamDecorator;
-/* harmony export (immutable) */ __webpack_exports__["c"] = makePropDecorator;
-/**
- * @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 /** @type {?} */ _nextClassId = 0;
-var /** @type {?} */ Reflect = __WEBPACK_IMPORTED_MODULE_0__facade_lang__["d" /* global */].Reflect;
-/**
- * @param {?} annotation
- * @return {?}
- */
-function extractAnnotation(annotation) {
- if (typeof annotation === 'function' && annotation.hasOwnProperty('annotation')) {
- // it is a decorator, extract annotation
- annotation = annotation.annotation;
- }
- return annotation;
-}
-/**
- * @param {?} fnOrArray
- * @param {?} key
- * @return {?}
- */
-function applyParams(fnOrArray, key) {
- if (fnOrArray === Object || fnOrArray === String || fnOrArray === Function ||
- fnOrArray === Number || fnOrArray === Array) {
- throw new Error("Can not use native " + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__facade_lang__["c" /* stringify */])(fnOrArray) + " as constructor");
- }
- if (typeof fnOrArray === 'function') {
- return fnOrArray;
- }
- if (Array.isArray(fnOrArray)) {
- var /** @type {?} */ annotations = fnOrArray;
- var /** @type {?} */ annoLength = annotations.length - 1;
- var /** @type {?} */ fn = fnOrArray[annoLength];
- if (typeof fn !== 'function') {
- throw new Error("Last position of Class method array must be Function in key " + key + " was '" + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__facade_lang__["c" /* stringify */])(fn) + "'");
- }
- if (annoLength != fn.length) {
- throw new Error("Number of annotations (" + annoLength + ") does not match number of arguments (" + fn.length + ") in the function: " + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__facade_lang__["c" /* stringify */])(fn));
- }
- var /** @type {?} */ paramsAnnotations = [];
- for (var /** @type {?} */ i = 0, /** @type {?} */ ii = annotations.length - 1; i < ii; i++) {
- var /** @type {?} */ paramAnnotations = [];
- paramsAnnotations.push(paramAnnotations);
- var /** @type {?} */ annotation = annotations[i];
- if (Array.isArray(annotation)) {
- for (var /** @type {?} */ j = 0; j < annotation.length; j++) {
- paramAnnotations.push(extractAnnotation(annotation[j]));
- }
- }
- else if (typeof annotation === 'function') {
- paramAnnotations.push(extractAnnotation(annotation));
- }
- else {
- paramAnnotations.push(annotation);
- }
- }
- Reflect.defineMetadata('parameters', paramsAnnotations, fn);
- return fn;
- }
- throw new Error("Only Function or Array is supported in Class definition for key '" + key + "' is '" + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__facade_lang__["c" /* stringify */])(fnOrArray) + "'");
-}
-/**
- * Provides a way for expressing ES6 classes with parameter annotations in ES5.
- *
- * ## Basic Example
- *
- * ```
- * var Greeter = ng.Class({
- * constructor: function(name) {
- * this.name = name;
- * },
- *
- * greet: function() {
- * alert('Hello ' + this.name + '!');
- * }
- * });
- * ```
- *
- * is equivalent to ES6:
- *
- * ```
- * class Greeter {
- * constructor(name) {
- * this.name = name;
- * }
- *
- * greet() {
- * alert('Hello ' + this.name + '!');
- * }
- * }
- * ```
- *
- * or equivalent to ES5:
- *
- * ```
- * var Greeter = function (name) {
- * this.name = name;
- * }
- *
- * Greeter.prototype.greet = function () {
- * alert('Hello ' + this.name + '!');
- * }
- * ```
- *
- * ### Example with parameter annotations
- *
- * ```
- * var MyService = ng.Class({
- * constructor: [String, [new Optional(), Service], function(name, myService) {
- * ...
- * }]
- * });
- * ```
- *
- * is equivalent to ES6:
- *
- * ```
- * class MyService {
- * constructor(name: string, \@Optional() myService: Service) {
- * ...
- * }
- * }
- * ```
- *
- * ### Example with inheritance
- *
- * ```
- * var Shape = ng.Class({
- * constructor: (color) {
- * this.color = color;
- * }
- * });
- *
- * var Square = ng.Class({
- * extends: Shape,
- * constructor: function(color, size) {
- * Shape.call(this, color);
- * this.size = size;
- * }
- * });
- * ```
- * \@stable
- * @param {?} clsDef
- * @return {?}
- */
-function Class(clsDef) {
- var /** @type {?} */ constructor = applyParams(clsDef.hasOwnProperty('constructor') ? clsDef.constructor : undefined, 'constructor');
- var /** @type {?} */ proto = constructor.prototype;
- if (clsDef.hasOwnProperty('extends')) {
- if (typeof clsDef.extends === 'function') {
- ((constructor)).prototype = proto =
- Object.create(((clsDef.extends)).prototype);
- }
- else {
- throw new Error("Class definition 'extends' property must be a constructor function was: " + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__facade_lang__["c" /* stringify */])(clsDef.extends));
- }
- }
- for (var key in clsDef) {
- if (key !== 'extends' && key !== 'prototype' && clsDef.hasOwnProperty(key)) {
- proto[key] = applyParams(clsDef[key], key);
- }
- }
- if (this && this.annotations instanceof Array) {
- Reflect.defineMetadata('annotations', this.annotations, constructor);
- }
- var /** @type {?} */ constructorName = constructor['name'];
- if (!constructorName || constructorName === 'constructor') {
- ((constructor))['overriddenName'] = "class" + _nextClassId++;
- }
- return (constructor);
-}
-/**
- * @param {?} name
- * @param {?} props
- * @param {?=} parentClass
- * @param {?=} chainFn
- * @return {?}
- */
-function makeDecorator(name, props, parentClass, chainFn) {
- if (chainFn === void 0) { chainFn = null; }
- var /** @type {?} */ metaCtor = makeMetadataCtor([props]);
- /**
- * @param {?} objOrType
- * @return {?}
- */
- function DecoratorFactory(objOrType) {
- if (!(Reflect && Reflect.getOwnMetadata)) {
- throw 'reflect-metadata shim is required when using class decorators';
- }
- if (this instanceof DecoratorFactory) {
- metaCtor.call(this, objOrType);
- return this;
- }
- var /** @type {?} */ annotationInstance = new ((DecoratorFactory))(objOrType);
- var /** @type {?} */ chainAnnotation = typeof this === 'function' && Array.isArray(this.annotations) ? this.annotations : [];
- chainAnnotation.push(annotationInstance);
- var /** @type {?} */ TypeDecorator = (function TypeDecorator(cls) {
- var /** @type {?} */ annotations = Reflect.getOwnMetadata('annotations', cls) || [];
- annotations.push(annotationInstance);
- Reflect.defineMetadata('annotations', annotations, cls);
- return cls;
- });
- TypeDecorator.annotations = chainAnnotation;
- TypeDecorator.Class = Class;
- if (chainFn)
- chainFn(TypeDecorator);
- return TypeDecorator;
- }
- if (parentClass) {
- DecoratorFactory.prototype = Object.create(parentClass.prototype);
- }
- DecoratorFactory.prototype.toString = function () { return ("@" + name); };
- ((DecoratorFactory)).annotationCls = DecoratorFactory;
- return DecoratorFactory;
-}
-/**
- * @param {?} props
- * @return {?}
- */
-function makeMetadataCtor(props) {
- return function ctor() {
- var _this = this;
- var args = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- args[_i - 0] = arguments[_i];
- }
- props.forEach(function (prop, i) {
- var /** @type {?} */ argVal = args[i];
- if (Array.isArray(prop)) {
- // plain parameter
- _this[prop[0]] = argVal === undefined ? prop[1] : argVal;
- }
- else {
- for (var propName in prop) {
- _this[propName] =
- argVal && argVal.hasOwnProperty(propName) ? argVal[propName] : prop[propName];
- }
- }
- });
- };
-}
-/**
- * @param {?} name
- * @param {?} props
- * @param {?=} parentClass
- * @return {?}
- */
-function makeParamDecorator(name, props, parentClass) {
- var /** @type {?} */ metaCtor = makeMetadataCtor(props);
- /**
- * @param {...?} args
- * @return {?}
- */
- function ParamDecoratorFactory() {
- var args = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- args[_i - 0] = arguments[_i];
- }
- if (this instanceof ParamDecoratorFactory) {
- metaCtor.apply(this, args);
- return this;
- }
- var /** @type {?} */ annotationInstance = new ((_a = ((ParamDecoratorFactory))).bind.apply(_a, [void 0].concat(args)))();
- ((ParamDecorator)).annotation = annotationInstance;
- return ParamDecorator;
- /**
- * @param {?} cls
- * @param {?} unusedKey
- * @param {?} index
- * @return {?}
- */
- function ParamDecorator(cls, unusedKey, index) {
- var /** @type {?} */ parameters = Reflect.getOwnMetadata('parameters', cls) || [];
- // there might be gaps if some in between parameters do not have annotations.
- // we pad with nulls.
- while (parameters.length <= index) {
- parameters.push(null);
- }
- parameters[index] = parameters[index] || [];
- parameters[index].push(annotationInstance);
- Reflect.defineMetadata('parameters', parameters, cls);
- return cls;
- }
- var _a;
- }
- if (parentClass) {
- ParamDecoratorFactory.prototype = Object.create(parentClass.prototype);
- }
- ParamDecoratorFactory.prototype.toString = function () { return ("@" + name); };
- ((ParamDecoratorFactory)).annotationCls = ParamDecoratorFactory;
- return ParamDecoratorFactory;
-}
-/**
- * @param {?} name
- * @param {?} props
- * @param {?=} parentClass
- * @return {?}
- */
-function makePropDecorator(name, props, parentClass) {
- var /** @type {?} */ metaCtor = makeMetadataCtor(props);
- /**
- * @param {...?} args
- * @return {?}
- */
- function PropDecoratorFactory() {
- var args = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- args[_i - 0] = arguments[_i];
- }
- if (this instanceof PropDecoratorFactory) {
- metaCtor.apply(this, args);
- return this;
- }
- var /** @type {?} */ decoratorInstance = new ((_a = ((PropDecoratorFactory))).bind.apply(_a, [void 0].concat(args)))();
- return function PropDecorator(target, name) {
- var /** @type {?} */ meta = Reflect.getOwnMetadata('propMetadata', target.constructor) || {};
- meta[name] = meta.hasOwnProperty(name) && meta[name] || [];
- meta[name].unshift(decoratorInstance);
- Reflect.defineMetadata('propMetadata', meta, target.constructor);
- };
- var _a;
- }
- if (parentClass) {
- PropDecoratorFactory.prototype = Object.create(parentClass.prototype);
- }
- PropDecoratorFactory.prototype.toString = function () { return ("@" + name); };
- ((PropDecoratorFactory)).annotationCls = PropDecoratorFactory;
- return PropDecoratorFactory;
-}
-//# sourceMappingURL=decorators.js.map
-
-/***/ }),
-/* 95 */,
-/* 96 */,
-/* 97 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__dom_adapter__ = __webpack_require__(24);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return EVENT_MANAGER_PLUGINS; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return EventManager; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return EventManagerPlugin; });
-/**
- * @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
- */
-
-
-/**
- * @stable
- */
-var /** @type {?} */ EVENT_MANAGER_PLUGINS = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["H" /* OpaqueToken */]('EventManagerPlugins');
-/**
- * \@stable
- */
-var EventManager = (function () {
- /**
- * @param {?} plugins
- * @param {?} _zone
- */
- function EventManager(plugins, _zone) {
- var _this = this;
- this._zone = _zone;
- this._eventNameToPlugin = new Map();
- plugins.forEach(function (p) { return p.manager = _this; });
- this._plugins = plugins.slice().reverse();
- }
- /**
- * @param {?} element
- * @param {?} eventName
- * @param {?} handler
- * @return {?}
- */
- EventManager.prototype.addEventListener = function (element, eventName, handler) {
- var /** @type {?} */ plugin = this._findPluginFor(eventName);
- return plugin.addEventListener(element, eventName, handler);
- };
- /**
- * @param {?} target
- * @param {?} eventName
- * @param {?} handler
- * @return {?}
- */
- EventManager.prototype.addGlobalEventListener = function (target, eventName, handler) {
- var /** @type {?} */ plugin = this._findPluginFor(eventName);
- return plugin.addGlobalEventListener(target, eventName, handler);
- };
- /**
- * @return {?}
- */
- EventManager.prototype.getZone = function () { return this._zone; };
- /**
- * \@internal
- * @param {?} eventName
- * @return {?}
- */
- EventManager.prototype._findPluginFor = function (eventName) {
- var /** @type {?} */ plugin = this._eventNameToPlugin.get(eventName);
- if (plugin) {
- return plugin;
- }
- var /** @type {?} */ plugins = this._plugins;
- for (var /** @type {?} */ i = 0; i < plugins.length; i++) {
- var /** @type {?} */ plugin_1 = plugins[i];
- if (plugin_1.supports(eventName)) {
- this._eventNameToPlugin.set(eventName, plugin_1);
- return plugin_1;
- }
- }
- throw new Error("No event manager plugin found for event " + eventName);
- };
- EventManager.decorators = [
- { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["d" /* Injectable */] },
- ];
- /** @nocollapse */
- EventManager.ctorParameters = function () { return [
- { type: Array, decorators: [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["q" /* Inject */], args: [EVENT_MANAGER_PLUGINS,] },] },
- { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["I" /* NgZone */], },
- ]; };
- return EventManager;
-}());
-function EventManager_tsickle_Closure_declarations() {
- /** @type {?} */
- EventManager.decorators;
- /**
- * @nocollapse
- * @type {?}
- */
- EventManager.ctorParameters;
- /** @type {?} */
- EventManager.prototype._plugins;
- /** @type {?} */
- EventManager.prototype._eventNameToPlugin;
- /** @type {?} */
- EventManager.prototype._zone;
-}
-/**
- * @abstract
- */
-var EventManagerPlugin = (function () {
- function EventManagerPlugin() {
- }
- /**
- * @abstract
- * @param {?} eventName
- * @return {?}
- */
- EventManagerPlugin.prototype.supports = function (eventName) { };
- /**
- * @abstract
- * @param {?} element
- * @param {?} eventName
- * @param {?} handler
- * @return {?}
- */
- EventManagerPlugin.prototype.addEventListener = function (element, eventName, handler) { };
- /**
- * @param {?} element
- * @param {?} eventName
- * @param {?} handler
- * @return {?}
- */
- EventManagerPlugin.prototype.addGlobalEventListener = function (element, eventName, handler) {
- var /** @type {?} */ target = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__dom_adapter__["b" /* getDOM */])().getGlobalEventTarget(element);
- if (!target) {
- throw new Error("Unsupported event target " + target + " for event " + eventName);
- }
- return this.addEventListener(target, eventName, handler);
- };
- ;
- return EventManagerPlugin;
-}());
-function EventManagerPlugin_tsickle_Closure_declarations() {
- /** @type {?} */
- EventManagerPlugin.prototype.manager;
-}
-//# sourceMappingURL=event_manager.js.map
-
-/***/ }),
-/* 98 */,
-/* 99 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var ng_from_import = __webpack_require__(51);
-var ng_from_global = angular;
-exports.ng = (ng_from_import && ng_from_import.module) ? ng_from_import : ng_from_global;
-//# sourceMappingURL=angular.js.map
-
-/***/ }),
-/* 100 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// optional / simple context binding
-var aFunction = __webpack_require__(85);
-module.exports = function(fn, that, length){
- aFunction(fn);
- if(that === undefined)return fn;
- switch(length){
- case 1: return function(a){
- return fn.call(that, a);
- };
- case 2: return function(a, b){
- return fn.call(that, a, b);
- };
- case 3: return function(a, b, c){
- return fn.call(that, a, b, c);
- };
- }
- return function(/* ...args */){
- return fn.apply(that, arguments);
- };
-};
-
-/***/ }),
-/* 101 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
-var anObject = __webpack_require__(9)
- , dPs = __webpack_require__(439)
- , enumBugKeys = __webpack_require__(282)
- , IE_PROTO = __webpack_require__(295)('IE_PROTO')
- , Empty = function(){ /* empty */ }
- , PROTOTYPE = 'prototype';
-
-// Create object with fake `null` prototype: use iframe Object with cleared prototype
-var createDict = function(){
- // Thrash, waste and sodomy: IE GC bug
- var iframe = __webpack_require__(428)('iframe')
- , i = enumBugKeys.length
- , lt = '<'
- , gt = '>'
- , iframeDocument;
- iframe.style.display = 'none';
- __webpack_require__(429).appendChild(iframe);
- iframe.src = 'javascript:'; // eslint-disable-line no-script-url
- // createDict = iframe.contentWindow.Object;
- // html.removeChild(iframe);
- iframeDocument = iframe.contentWindow.document;
- iframeDocument.open();
- iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
- iframeDocument.close();
- createDict = iframeDocument.F;
- while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];
- return createDict();
-};
-
-module.exports = Object.create || function create(O, Properties){
- var result;
- if(O !== null){
- Empty[PROTOTYPE] = anObject(O);
- result = new Empty;
- Empty[PROTOTYPE] = null;
- // add "__proto__" for Object.getPrototypeOf polyfill
- result[IE_PROTO] = O;
- } else result = createDict();
- return Properties === undefined ? result : dPs(result, Properties);
-};
-
-
-/***/ }),
-/* 102 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 19.1.2.14 / 15.2.3.14 Object.keys(O)
-var $keys = __webpack_require__(441)
- , enumBugKeys = __webpack_require__(282);
-
-module.exports = Object.keys || function keys(O){
- return $keys(O, enumBugKeys);
-};
-
-/***/ }),
-/* 103 */
-/***/ (function(module, exports) {
-
-// 7.1.4 ToInteger
-var ceil = Math.ceil
- , floor = Math.floor;
-module.exports = function(it){
- return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
-};
-
-/***/ }),
-/* 104 */,
-/* 105 */,
-/* 106 */,
-/* 107 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-/**
- * UI-Router Transition Tracing
- *
- * Enable transition tracing to print transition information to the console,
- * in order to help debug your application.
- * Tracing logs detailed information about each Transition to your console.
- *
- * To enable tracing, import the [[Trace]] singleton and enable one or more categories.
- *
- * ### ES6
- * ```js
- * import {trace} from "ui-router-ng2"; // or "angular-ui-router"
- * trace.enable(1, 5); // TRANSITION and VIEWCONFIG
- * ```
- *
- * ### CJS
- * ```js
- * let trace = require("angular-ui-router").trace; // or "ui-router-ng2"
- * trace.enable("TRANSITION", "VIEWCONFIG");
- * ```
- *
- * ### Globals
- * ```js
- * let trace = window["angular-ui-router"].trace; // or "ui-router-ng2"
- * trace.enable(); // Trace everything (very verbose)
- * ```
- *
- * ### Angular 1:
- * ```js
- * app.run($trace => $trace.enable());
- * ```
- *
- * @coreapi
- * @module trace
- */ /** for typedoc */
-var hof_1 = __webpack_require__(16);
-var predicates_1 = __webpack_require__(12);
-var strings_1 = __webpack_require__(76);
-/** @hidden */
-function uiViewString(viewData) {
- if (!viewData)
- return 'ui-view (defunct)';
- return "[ui-view#" + viewData.id + " tag " +
- ("in template from '" + (viewData.creationContext && viewData.creationContext.name || '(root)') + "' state]: ") +
- ("fqn: '" + viewData.fqn + "', ") +
- ("name: '" + viewData.name + "@" + viewData.creationContext + "')");
-}
-/** @hidden */
-var viewConfigString = function (viewConfig) {
- return "[ViewConfig#" + viewConfig.$id + " from '" + (viewConfig.viewDecl.$context.name || '(root)') + "' state]: target ui-view: '" + viewConfig.viewDecl.$uiViewName + "@" + viewConfig.viewDecl.$uiViewContextAnchor + "'";
-};
-/** @hidden */
-function normalizedCat(input) {
- return predicates_1.isNumber(input) ? Category[input] : Category[Category[input]];
-}
-/**
- * Trace categories Enum
- *
- * Enable or disable a category using [[Trace.enable]] or [[Trace.disable]]
- *
- * `trace.enable(Category.TRANSITION)`
- *
- * These can also be provided using a matching string, or position ordinal
- *
- * `trace.enable("TRANSITION")`
- *
- * `trace.enable(1)`
- */
-var Category;
-(function (Category) {
- Category[Category["RESOLVE"] = 0] = "RESOLVE";
- Category[Category["TRANSITION"] = 1] = "TRANSITION";
- Category[Category["HOOK"] = 2] = "HOOK";
- Category[Category["UIVIEW"] = 3] = "UIVIEW";
- Category[Category["VIEWCONFIG"] = 4] = "VIEWCONFIG";
-})(Category = exports.Category || (exports.Category = {}));
-/**
- * Prints UI-Router Transition trace information to the console.
- */
-var Trace = (function () {
- /** @hidden */
- function Trace() {
- /** @hidden */
- this._enabled = {};
- this.approximateDigests = 0;
- }
- /** @hidden */
- Trace.prototype._set = function (enabled, categories) {
- var _this = this;
- if (!categories.length) {
- categories = Object.keys(Category)
- .map(function (k) { return parseInt(k, 10); })
- .filter(function (k) { return !isNaN(k); })
- .map(function (key) { return Category[key]; });
- }
- categories.map(normalizedCat).forEach(function (category) { return _this._enabled[category] = enabled; });
- };
- /**
- * Enables a trace [[Category]]
- *
- * ```js
- * trace.enable("TRANSITION");
- * ```
- *
- * @param categories categories to enable. If `categories` is omitted, all categories are enabled.
- * Also takes strings (category name) or ordinal (category position)
- */
- Trace.prototype.enable = function () {
- var categories = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- categories[_i] = arguments[_i];
- }
- this._set(true, categories);
- };
- /**
- * Disables a trace [[Category]]
- *
- * ```js
- * trace.disable("VIEWCONFIG");
- * ```
- *
- * @param categories categories to disable. If `categories` is omitted, all categories are disabled.
- * Also takes strings (category name) or ordinal (category position)
- */
- Trace.prototype.disable = function () {
- var categories = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- categories[_i] = arguments[_i];
- }
- this._set(false, categories);
- };
- /**
- * Retrieves the enabled stateus of a [[Category]]
- *
- * ```js
- * trace.enabled("VIEWCONFIG"); // true or false
- * ```
- *
- * @returns boolean true if the category is enabled
- */
- Trace.prototype.enabled = function (category) {
- return !!this._enabled[normalizedCat(category)];
- };
- /** @internalapi called by ui-router code */
- Trace.prototype.traceTransitionStart = function (trans) {
- if (!this.enabled(Category.TRANSITION))
- return;
- var tid = trans.$id, digest = this.approximateDigests, transitionStr = strings_1.stringify(trans);
- console.log("Transition #" + tid + " r" + trans.router.$id + ": Started -> " + transitionStr);
- };
- /** @internalapi called by ui-router code */
- Trace.prototype.traceTransitionIgnored = function (trans) {
- if (!this.enabled(Category.TRANSITION))
- return;
- var tid = trans && trans.$id, digest = this.approximateDigests, transitionStr = strings_1.stringify(trans);
- console.log("Transition #" + tid + " r" + trans.router.$id + ": Ignored <> " + transitionStr);
- };
- /** @internalapi called by ui-router code */
- Trace.prototype.traceHookInvocation = function (step, trans, options) {
- if (!this.enabled(Category.HOOK))
- return;
- var tid = hof_1.parse("transition.$id")(options), digest = this.approximateDigests, event = hof_1.parse("traceData.hookType")(options) || "internal", context = hof_1.parse("traceData.context.state.name")(options) || hof_1.parse("traceData.context")(options) || "unknown", name = strings_1.functionToString(step.registeredHook.callback);
- console.log("Transition #" + tid + " r" + trans.router.$id + ": Hook -> " + event + " context: " + context + ", " + strings_1.maxLength(200, name));
- };
- /** @internalapi called by ui-router code */
- Trace.prototype.traceHookResult = function (hookResult, trans, transitionOptions) {
- if (!this.enabled(Category.HOOK))
- return;
- var tid = hof_1.parse("transition.$id")(transitionOptions), digest = this.approximateDigests, hookResultStr = strings_1.stringify(hookResult);
- console.log("Transition #" + tid + " r" + trans.router.$id + ": <- Hook returned: " + strings_1.maxLength(200, hookResultStr));
- };
- /** @internalapi called by ui-router code */
- Trace.prototype.traceResolvePath = function (path, when, trans) {
- if (!this.enabled(Category.RESOLVE))
- return;
- var tid = trans && trans.$id, digest = this.approximateDigests, pathStr = path && path.toString();
- console.log("Transition #" + tid + " r" + trans.router.$id + ": Resolving " + pathStr + " (" + when + ")");
- };
- /** @internalapi called by ui-router code */
- Trace.prototype.traceResolvableResolved = function (resolvable, trans) {
- if (!this.enabled(Category.RESOLVE))
- return;
- var tid = trans && trans.$id, digest = this.approximateDigests, resolvableStr = resolvable && resolvable.toString(), result = strings_1.stringify(resolvable.data);
- console.log("Transition #" + tid + " r" + trans.router.$id + ": <- Resolved " + resolvableStr + " to: " + strings_1.maxLength(200, result));
- };
- /** @internalapi called by ui-router code */
- Trace.prototype.traceError = function (reason, trans) {
- if (!this.enabled(Category.TRANSITION))
- return;
- var tid = trans && trans.$id, digest = this.approximateDigests, transitionStr = strings_1.stringify(trans);
- console.log("Transition #" + tid + " r" + trans.router.$id + ": <- Rejected " + transitionStr + ", reason: " + reason);
- };
- /** @internalapi called by ui-router code */
- Trace.prototype.traceSuccess = function (finalState, trans) {
- if (!this.enabled(Category.TRANSITION))
- return;
- var tid = trans && trans.$id, digest = this.approximateDigests, state = finalState.name, transitionStr = strings_1.stringify(trans);
- console.log("Transition #" + tid + " r" + trans.router.$id + ": <- Success " + transitionStr + ", final state: " + state);
- };
- /** @internalapi called by ui-router code */
- Trace.prototype.traceUIViewEvent = function (event, viewData, extra) {
- if (extra === void 0) { extra = ""; }
- if (!this.enabled(Category.UIVIEW))
- return;
- console.log("ui-view: " + strings_1.padString(30, event) + " " + uiViewString(viewData) + extra);
- };
- /** @internalapi called by ui-router code */
- Trace.prototype.traceUIViewConfigUpdated = function (viewData, context) {
- if (!this.enabled(Category.UIVIEW))
- return;
- this.traceUIViewEvent("Updating", viewData, " with ViewConfig from context='" + context + "'");
- };
- /** @internalapi called by ui-router code */
- Trace.prototype.traceUIViewFill = function (viewData, html) {
- if (!this.enabled(Category.UIVIEW))
- return;
- this.traceUIViewEvent("Fill", viewData, " with: " + strings_1.maxLength(200, html));
- };
- /** @internalapi called by ui-router code */
- Trace.prototype.traceViewServiceEvent = function (event, viewConfig) {
- if (!this.enabled(Category.VIEWCONFIG))
- return;
- console.log("VIEWCONFIG: " + event + " " + viewConfigString(viewConfig));
- };
- /** @internalapi called by ui-router code */
- Trace.prototype.traceViewServiceUIViewEvent = function (event, viewData) {
- if (!this.enabled(Category.VIEWCONFIG))
- return;
- console.log("VIEWCONFIG: " + event + " " + uiViewString(viewData));
- };
- return Trace;
-}());
-exports.Trace = Trace;
-/**
- * The [[Trace]] singleton
- *
- * #### Example:
- * ```js
- * import {trace} from "angular-ui-router";
- * trace.enable(1, 5);
- * ```
- */
-var trace = new Trace();
-exports.trace = trace;
-//# sourceMappingURL=trace.js.map
-
-/***/ }),
-/* 108 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-/**
- * @internalapi
- * @module params
- */ /** for typedoc */
-var common_1 = __webpack_require__(8);
-var hof_1 = __webpack_require__(16);
-var predicates_1 = __webpack_require__(12);
-var coreservices_1 = __webpack_require__(31);
-var paramType_1 = __webpack_require__(314);
-var hasOwn = Object.prototype.hasOwnProperty;
-var isShorthand = function (cfg) {
- return ["value", "type", "squash", "array", "dynamic"].filter(hasOwn.bind(cfg || {})).length === 0;
-};
-var DefType;
-(function (DefType) {
- DefType[DefType["PATH"] = 0] = "PATH";
- DefType[DefType["SEARCH"] = 1] = "SEARCH";
- DefType[DefType["CONFIG"] = 2] = "CONFIG";
-})(DefType = exports.DefType || (exports.DefType = {}));
-function unwrapShorthand(cfg) {
- cfg = isShorthand(cfg) && { value: cfg } || cfg;
- return common_1.extend(cfg, {
- $$fn: predicates_1.isInjectable(cfg.value) ? cfg.value : function () { return cfg.value; }
- });
-}
-function getType(cfg, urlType, location, id, paramTypes) {
- if (cfg.type && urlType && urlType.name !== 'string')
- throw new Error("Param '" + id + "' has two type configurations.");
- if (cfg.type && urlType && urlType.name === 'string' && paramTypes.type(cfg.type))
- return paramTypes.type(cfg.type);
- if (urlType)
- return urlType;
- if (!cfg.type) {
- var type = location === DefType.CONFIG ? "any" :
- location === DefType.PATH ? "path" :
- location === DefType.SEARCH ? "query" : "string";
- return paramTypes.type(type);
- }
- return cfg.type instanceof paramType_1.ParamType ? cfg.type : paramTypes.type(cfg.type);
-}
-/**
- * returns false, true, or the squash value to indicate the "default parameter url squash policy".
- */
-function getSquashPolicy(config, isOptional, defaultPolicy) {
- var squash = config.squash;
- if (!isOptional || squash === false)
- return false;
- if (!predicates_1.isDefined(squash) || squash == null)
- return defaultPolicy;
- if (squash === true || predicates_1.isString(squash))
- return squash;
- throw new Error("Invalid squash policy: '" + squash + "'. Valid policies: false, true, or arbitrary string");
-}
-function getReplace(config, arrayMode, isOptional, squash) {
- var replace, configuredKeys, defaultPolicy = [
- { from: "", to: (isOptional || arrayMode ? undefined : "") },
- { from: null, to: (isOptional || arrayMode ? undefined : "") }
- ];
- replace = predicates_1.isArray(config.replace) ? config.replace : [];
- if (predicates_1.isString(squash))
- replace.push({ from: squash, to: undefined });
- configuredKeys = common_1.map(replace, hof_1.prop("from"));
- return common_1.filter(defaultPolicy, function (item) { return configuredKeys.indexOf(item.from) === -1; }).concat(replace);
-}
-var Param = (function () {
- function Param(id, type, config, location, urlMatcherFactory) {
- config = unwrapShorthand(config);
- type = getType(config, type, location, id, urlMatcherFactory.paramTypes);
- var arrayMode = getArrayMode();
- type = arrayMode ? type.$asArray(arrayMode, location === DefType.SEARCH) : type;
- var isOptional = config.value !== undefined || location === DefType.SEARCH;
- var dynamic = predicates_1.isDefined(config.dynamic) ? !!config.dynamic : !!type.dynamic;
- var raw = predicates_1.isDefined(config.raw) ? !!config.raw : !!type.raw;
- var squash = getSquashPolicy(config, isOptional, urlMatcherFactory.defaultSquashPolicy());
- var replace = getReplace(config, arrayMode, isOptional, squash);
- var inherit = predicates_1.isDefined(config.inherit) ? !!config.inherit : !!type.inherit;
- // array config: param name (param[]) overrides default settings. explicit config overrides param name.
- function getArrayMode() {
- var arrayDefaults = { array: (location === DefType.SEARCH ? "auto" : false) };
- var arrayParamNomenclature = id.match(/\[\]$/) ? { array: true } : {};
- return common_1.extend(arrayDefaults, arrayParamNomenclature, config).array;
- }
- common_1.extend(this, { id: id, type: type, location: location, isOptional: isOptional, dynamic: dynamic, raw: raw, squash: squash, replace: replace, inherit: inherit, array: arrayMode, config: config, });
- }
- Param.prototype.isDefaultValue = function (value) {
- return this.isOptional && this.type.equals(this.value(), value);
- };
- /**
- * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the
- * default value, which may be the result of an injectable function.
- */
- Param.prototype.value = function (value) {
- var _this = this;
- /**
- * [Internal] Get the default value of a parameter, which may be an injectable function.
- */
- var $$getDefaultValue = function () {
- if (!coreservices_1.services.$injector)
- throw new Error("Injectable functions cannot be called at configuration time");
- var defaultValue = coreservices_1.services.$injector.invoke(_this.config.$$fn);
- if (defaultValue !== null && defaultValue !== undefined && !_this.type.is(defaultValue))
- throw new Error("Default value (" + defaultValue + ") for parameter '" + _this.id + "' is not an instance of ParamType (" + _this.type.name + ")");
- return defaultValue;
- };
- var $replace = function (val) {
- var replacement = common_1.map(common_1.filter(_this.replace, hof_1.propEq('from', val)), hof_1.prop("to"));
- return replacement.length ? replacement[0] : val;
- };
- value = $replace(value);
- return !predicates_1.isDefined(value) ? $$getDefaultValue() : this.type.$normalize(value);
- };
- Param.prototype.isSearch = function () {
- return this.location === DefType.SEARCH;
- };
- Param.prototype.validates = function (value) {
- // There was no parameter value, but the param is optional
- if ((!predicates_1.isDefined(value) || value === null) && this.isOptional)
- return true;
- // The value was not of the correct ParamType, and could not be decoded to the correct ParamType
- var normalized = this.type.$normalize(value);
- if (!this.type.is(normalized))
- return false;
- // The value was of the correct type, but when encoded, did not match the ParamType's regexp
- var encoded = this.type.encode(normalized);
- return !(predicates_1.isString(encoded) && !this.type.pattern.exec(encoded));
- };
- Param.prototype.toString = function () {
- return "{Param:" + this.id + " " + this.type + " squash: '" + this.squash + "' optional: " + this.isOptional + "}";
- };
- Param.values = function (params, values) {
- if (values === void 0) { values = {}; }
- return params.map(function (param) { return [param.id, param.value(values[param.id])]; }).reduce(common_1.applyPairs, {});
- };
- /**
- * Finds [[Param]] objects which have different param values
- *
- * Filters a list of [[Param]] objects to only those whose parameter values differ in two param value objects
- *
- * @param params: The list of Param objects to filter
- * @param values1: The first set of parameter values
- * @param values2: the second set of parameter values
- *
- * @returns any Param objects whose values were different between values1 and values2
- */
- Param.changed = function (params, values1, values2) {
- if (values1 === void 0) { values1 = {}; }
- if (values2 === void 0) { values2 = {}; }
- return params.filter(function (param) { return !param.type.equals(values1[param.id], values2[param.id]); });
- };
- /**
- * Checks if two param value objects are equal (for a set of [[Param]] objects)
- *
- * @param params The list of [[Param]] objects to check
- * @param values1 The first set of param values
- * @param values2 The second set of param values
- *
- * @returns true if the param values in values1 and values2 are equal
- */
- Param.equals = function (params, values1, values2) {
- if (values1 === void 0) { values1 = {}; }
- if (values2 === void 0) { values2 = {}; }
- return Param.changed(params, values1, values2).length === 0;
- };
- /** Returns true if a the parameter values are valid, according to the Param definitions */
- Param.validates = function (params, values) {
- if (values === void 0) { values = {}; }
- return params.map(function (param) { return param.validates(values[param.id]); }).reduce(common_1.allTrueR, true);
- };
- return Param;
-}());
-exports.Param = Param;
-//# sourceMappingURL=param.js.map
-
-/***/ }),
-/* 109 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_platform_browser__ = __webpack_require__(620);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__src_platform_browser__["a"]; });
-/* unused harmony reexport platformBrowser */
-/* unused harmony reexport Title */
-/* unused harmony reexport disableDebugTools */
-/* unused harmony reexport enableDebugTools */
-/* unused harmony reexport AnimationDriver */
-/* unused harmony reexport By */
-/* unused harmony reexport NgProbeToken */
-/* unused harmony reexport DOCUMENT */
-/* unused harmony reexport EVENT_MANAGER_PLUGINS */
-/* unused harmony reexport EventManager */
-/* unused harmony reexport HAMMER_GESTURE_CONFIG */
-/* unused harmony reexport HammerGestureConfig */
-/* unused harmony reexport DomSanitizer */
-/* unused harmony reexport VERSION */
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__src_platform_browser__["b"]; });
-/**
- * @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
- */
-/**
- * @module
- * @description
- * Entry point for all public APIs of the platform-browser package.
- */
-
-//# sourceMappingURL=index.js.map
-
-/***/ }),
-/* 110 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_aot_downgrade_component__ = __webpack_require__(637);
-/* unused harmony reexport downgradeComponent */
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_aot_downgrade_injectable__ = __webpack_require__(639);
-/* unused harmony reexport downgradeInjectable */
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_aot_upgrade_component__ = __webpack_require__(640);
-/* unused harmony reexport UpgradeComponent */
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__src_aot_upgrade_module__ = __webpack_require__(641);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_3__src_aot_upgrade_module__["a"]; });
-/**
- * @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
- */
-
-
-
-
-//# sourceMappingURL=static.js.map
-
-/***/ }),
-/* 111 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_common__ = __webpack_require__(524);
-/* unused harmony reexport NgLocalization */
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__src_common__["a"]; });
-/* unused harmony reexport NgClass */
-/* unused harmony reexport NgFor */
-/* unused harmony reexport NgIf */
-/* unused harmony reexport NgPlural */
-/* unused harmony reexport NgPluralCase */
-/* unused harmony reexport NgStyle */
-/* unused harmony reexport NgSwitch */
-/* unused harmony reexport NgSwitchCase */
-/* unused harmony reexport NgSwitchDefault */
-/* unused harmony reexport NgTemplateOutlet */
-/* unused harmony reexport AsyncPipe */
-/* unused harmony reexport DatePipe */
-/* unused harmony reexport I18nPluralPipe */
-/* unused harmony reexport I18nSelectPipe */
-/* unused harmony reexport JsonPipe */
-/* unused harmony reexport LowerCasePipe */
-/* unused harmony reexport CurrencyPipe */
-/* unused harmony reexport DecimalPipe */
-/* unused harmony reexport PercentPipe */
-/* unused harmony reexport SlicePipe */
-/* unused harmony reexport UpperCasePipe */
-/* unused harmony reexport VERSION */
-/* unused harmony reexport Version */
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__src_common__["b"]; });
-/* unused harmony reexport LOCATION_INITIALIZED */
-/* unused harmony reexport LocationStrategy */
-/* unused harmony reexport APP_BASE_HREF */
-/* unused harmony reexport HashLocationStrategy */
-/* unused harmony reexport PathLocationStrategy */
-/* unused harmony reexport Location */
-/**
- * @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
- */
-/**
- * @module
- * @description
- * Entry point for all public APIs of the common package.
- */
-
-//# sourceMappingURL=index.js.map
-
-/***/ }),
-/* 112 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__expression_parser_ast__ = __webpack_require__(226);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__facade_lang__ = __webpack_require__(6);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identifiers__ = __webpack_require__(19);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__output_output_ast__ = __webpack_require__(10);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__identifier_util__ = __webpack_require__(45);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return EventHandlerVars; });
-/* unused harmony export ConvertPropertyBindingResult */
-/* harmony export (immutable) */ __webpack_exports__["b"] = convertPropertyBinding;
-/* unused harmony export ConvertActionBindingResult */
-/* harmony export (immutable) */ __webpack_exports__["c"] = convertActionBinding;
-/* harmony export (immutable) */ __webpack_exports__["a"] = createSharedBindingVariablesIfNeeded;
-/* unused harmony export temporaryDeclaration */
-/**
- * @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 /** @type {?} */ VAL_UNWRAPPER_VAR = __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["a" /* variable */]("valUnwrapper");
-var EventHandlerVars = (function () {
- function EventHandlerVars() {
- }
- EventHandlerVars.event = __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["a" /* variable */]('$event');
- return EventHandlerVars;
-}());
-function EventHandlerVars_tsickle_Closure_declarations() {
- /** @type {?} */
- EventHandlerVars.event;
-}
-var ConvertPropertyBindingResult = (function () {
- /**
- * @param {?} stmts
- * @param {?} currValExpr
- * @param {?} forceUpdate
- */
- function ConvertPropertyBindingResult(stmts, currValExpr, forceUpdate) {
- this.stmts = stmts;
- this.currValExpr = currValExpr;
- this.forceUpdate = forceUpdate;
- }
- return ConvertPropertyBindingResult;
-}());
-function ConvertPropertyBindingResult_tsickle_Closure_declarations() {
- /** @type {?} */
- ConvertPropertyBindingResult.prototype.stmts;
- /** @type {?} */
- ConvertPropertyBindingResult.prototype.currValExpr;
- /** @type {?} */
- ConvertPropertyBindingResult.prototype.forceUpdate;
-}
-/**
- * Converts the given expression AST into an executable output AST, assuming the expression is
- * used in a property binding.
- * @param {?} builder
- * @param {?} nameResolver
- * @param {?} implicitReceiver
- * @param {?} expression
- * @param {?} bindingId
- * @return {?}
- */
-function convertPropertyBinding(builder, nameResolver, implicitReceiver, expression, bindingId) {
- var /** @type {?} */ currValExpr = createCurrValueExpr(bindingId);
- var /** @type {?} */ stmts = [];
- if (!nameResolver) {
- nameResolver = new DefaultNameResolver();
- }
- var /** @type {?} */ visitor = new _AstToIrVisitor(builder, nameResolver, implicitReceiver, VAL_UNWRAPPER_VAR, bindingId, false);
- var /** @type {?} */ outputExpr = expression.visit(visitor, _Mode.Expression);
- if (!outputExpr) {
- // e.g. an empty expression was given
- return null;
- }
- if (visitor.temporaryCount) {
- for (var /** @type {?} */ i = 0; i < visitor.temporaryCount; i++) {
- stmts.push(temporaryDeclaration(bindingId, i));
- }
- }
- if (visitor.needsValueUnwrapper) {
- var /** @type {?} */ initValueUnwrapperStmt = VAL_UNWRAPPER_VAR.callMethod('reset', []).toStmt();
- stmts.push(initValueUnwrapperStmt);
- }
- stmts.push(currValExpr.set(outputExpr).toDeclStmt(null, [__WEBPACK_IMPORTED_MODULE_3__output_output_ast__["k" /* StmtModifier */].Final]));
- if (visitor.needsValueUnwrapper) {
- return new ConvertPropertyBindingResult(stmts, currValExpr, VAL_UNWRAPPER_VAR.prop('hasWrappedValue'));
- }
- else {
- return new ConvertPropertyBindingResult(stmts, currValExpr, null);
- }
-}
-var ConvertActionBindingResult = (function () {
- /**
- * @param {?} stmts
- * @param {?} preventDefault
- */
- function ConvertActionBindingResult(stmts, preventDefault) {
- this.stmts = stmts;
- this.preventDefault = preventDefault;
- }
- return ConvertActionBindingResult;
-}());
-function ConvertActionBindingResult_tsickle_Closure_declarations() {
- /** @type {?} */
- ConvertActionBindingResult.prototype.stmts;
- /** @type {?} */
- ConvertActionBindingResult.prototype.preventDefault;
-}
-/**
- * Converts the given expression AST into an executable output AST, assuming the expression is
- * used in an action binding (e.g. an event handler).
- * @param {?} builder
- * @param {?} nameResolver
- * @param {?} implicitReceiver
- * @param {?} action
- * @param {?} bindingId
- * @return {?}
- */
-function convertActionBinding(builder, nameResolver, implicitReceiver, action, bindingId) {
- if (!nameResolver) {
- nameResolver = new DefaultNameResolver();
- }
- var /** @type {?} */ visitor = new _AstToIrVisitor(builder, nameResolver, implicitReceiver, null, bindingId, true);
- var /** @type {?} */ actionStmts = [];
- flattenStatements(action.visit(visitor, _Mode.Statement), actionStmts);
- prependTemporaryDecls(visitor.temporaryCount, bindingId, actionStmts);
- var /** @type {?} */ lastIndex = actionStmts.length - 1;
- var /** @type {?} */ preventDefaultVar = null;
- if (lastIndex >= 0) {
- var /** @type {?} */ lastStatement = actionStmts[lastIndex];
- var /** @type {?} */ returnExpr = convertStmtIntoExpression(lastStatement);
- if (returnExpr) {
- // Note: We need to cast the result of the method call to dynamic,
- // as it might be a void method!
- preventDefaultVar = createPreventDefaultVar(bindingId);
- actionStmts[lastIndex] =
- preventDefaultVar.set(returnExpr.cast(__WEBPACK_IMPORTED_MODULE_3__output_output_ast__["m" /* DYNAMIC_TYPE */]).notIdentical(__WEBPACK_IMPORTED_MODULE_3__output_output_ast__["f" /* literal */](false)))
- .toDeclStmt(null, [__WEBPACK_IMPORTED_MODULE_3__output_output_ast__["k" /* StmtModifier */].Final]);
- }
- }
- return new ConvertActionBindingResult(actionStmts, preventDefaultVar);
-}
-/**
- * Creates variables that are shared by multiple calls to `convertActionBinding` /
- * `convertPropertyBinding`
- * @param {?} stmts
- * @return {?}
- */
-function createSharedBindingVariablesIfNeeded(stmts) {
- var /** @type {?} */ unwrapperStmts = [];
- var /** @type {?} */ readVars = __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["w" /* findReadVarNames */](stmts);
- if (readVars.has(VAL_UNWRAPPER_VAR.name)) {
- unwrapperStmts.push(VAL_UNWRAPPER_VAR
- .set(__WEBPACK_IMPORTED_MODULE_3__output_output_ast__["g" /* importExpr */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__identifiers__["a" /* createIdentifier */])(__WEBPACK_IMPORTED_MODULE_2__identifiers__["b" /* Identifiers */].ValueUnwrapper)).instantiate([]))
- .toDeclStmt(null, [__WEBPACK_IMPORTED_MODULE_3__output_output_ast__["k" /* StmtModifier */].Final]));
- }
- return unwrapperStmts;
-}
-/**
- * @param {?} bindingId
- * @param {?} temporaryNumber
- * @return {?}
- */
-function temporaryName(bindingId, temporaryNumber) {
- return "tmp_" + bindingId + "_" + temporaryNumber;
-}
-/**
- * @param {?} bindingId
- * @param {?} temporaryNumber
- * @return {?}
- */
-function temporaryDeclaration(bindingId, temporaryNumber) {
- return new __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["x" /* DeclareVarStmt */](temporaryName(bindingId, temporaryNumber), __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["b" /* NULL_EXPR */]);
-}
-/**
- * @param {?} temporaryCount
- * @param {?} bindingId
- * @param {?} statements
- * @return {?}
- */
-function prependTemporaryDecls(temporaryCount, bindingId, statements) {
- for (var /** @type {?} */ i = temporaryCount - 1; i >= 0; i--) {
- statements.unshift(temporaryDeclaration(bindingId, i));
- }
-}
-var _Mode = {};
-_Mode.Statement = 0;
-_Mode.Expression = 1;
-_Mode[_Mode.Statement] = "Statement";
-_Mode[_Mode.Expression] = "Expression";
-/**
- * @param {?} mode
- * @param {?} ast
- * @return {?}
- */
-function ensureStatementMode(mode, ast) {
- if (mode !== _Mode.Statement) {
- throw new Error("Expected a statement, but saw " + ast);
- }
-}
-/**
- * @param {?} mode
- * @param {?} ast
- * @return {?}
- */
-function ensureExpressionMode(mode, ast) {
- if (mode !== _Mode.Expression) {
- throw new Error("Expected an expression, but saw " + ast);
- }
-}
-/**
- * @param {?} mode
- * @param {?} expr
- * @return {?}
- */
-function convertToStatementIfNeeded(mode, expr) {
- if (mode === _Mode.Statement) {
- return expr.toStmt();
- }
- else {
- return expr;
- }
-}
-var _AstToIrVisitor = (function () {
- /**
- * @param {?} _builder
- * @param {?} _nameResolver
- * @param {?} _implicitReceiver
- * @param {?} _valueUnwrapper
- * @param {?} bindingId
- * @param {?} isAction
- */
- function _AstToIrVisitor(_builder, _nameResolver, _implicitReceiver, _valueUnwrapper, bindingId, isAction) {
- this._builder = _builder;
- this._nameResolver = _nameResolver;
- this._implicitReceiver = _implicitReceiver;
- this._valueUnwrapper = _valueUnwrapper;
- this.bindingId = bindingId;
- this.isAction = isAction;
- this._nodeMap = new Map();
- this._resultMap = new Map();
- this._currentTemporary = 0;
- this.needsValueUnwrapper = false;
- this.temporaryCount = 0;
- }
- /**
- * @param {?} ast
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.visitBinary = function (ast, mode) {
- var /** @type {?} */ op;
- switch (ast.operation) {
- case '+':
- op = __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["y" /* BinaryOperator */].Plus;
- break;
- case '-':
- op = __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["y" /* BinaryOperator */].Minus;
- break;
- case '*':
- op = __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["y" /* BinaryOperator */].Multiply;
- break;
- case '/':
- op = __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["y" /* BinaryOperator */].Divide;
- break;
- case '%':
- op = __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["y" /* BinaryOperator */].Modulo;
- break;
- case '&&':
- op = __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["y" /* BinaryOperator */].And;
- break;
- case '||':
- op = __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["y" /* BinaryOperator */].Or;
- break;
- case '==':
- op = __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["y" /* BinaryOperator */].Equals;
- break;
- case '!=':
- op = __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["y" /* BinaryOperator */].NotEquals;
- break;
- case '===':
- op = __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["y" /* BinaryOperator */].Identical;
- break;
- case '!==':
- op = __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["y" /* BinaryOperator */].NotIdentical;
- break;
- case '<':
- op = __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["y" /* BinaryOperator */].Lower;
- break;
- case '>':
- op = __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["y" /* BinaryOperator */].Bigger;
- break;
- case '<=':
- op = __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["y" /* BinaryOperator */].LowerEquals;
- break;
- case '>=':
- op = __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["y" /* BinaryOperator */].BiggerEquals;
- break;
- default:
- throw new Error("Unsupported operation " + ast.operation);
- }
- return convertToStatementIfNeeded(mode, new __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["z" /* BinaryOperatorExpr */](op, this.visit(ast.left, _Mode.Expression), this.visit(ast.right, _Mode.Expression)));
- };
- /**
- * @param {?} ast
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.visitChain = function (ast, mode) {
- ensureStatementMode(mode, ast);
- return this.visitAll(ast.expressions, mode);
- };
- /**
- * @param {?} ast
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.visitConditional = function (ast, mode) {
- var /** @type {?} */ value = this.visit(ast.condition, _Mode.Expression);
- return convertToStatementIfNeeded(mode, value.conditional(this.visit(ast.trueExp, _Mode.Expression), this.visit(ast.falseExp, _Mode.Expression)));
- };
- /**
- * @param {?} ast
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.visitPipe = function (ast, mode) {
- var /** @type {?} */ input = this.visit(ast.exp, _Mode.Expression);
- var /** @type {?} */ args = this.visitAll(ast.args, _Mode.Expression);
- var /** @type {?} */ value = this._nameResolver.callPipe(ast.name, input, args);
- if (!value) {
- throw new Error("Illegal state: Pipe " + ast.name + " is not allowed here!");
- }
- this.needsValueUnwrapper = true;
- return convertToStatementIfNeeded(mode, this._valueUnwrapper.callMethod('unwrap', [value]));
- };
- /**
- * @param {?} ast
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.visitFunctionCall = function (ast, mode) {
- return convertToStatementIfNeeded(mode, this.visit(ast.target, _Mode.Expression).callFn(this.visitAll(ast.args, _Mode.Expression)));
- };
- /**
- * @param {?} ast
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.visitImplicitReceiver = function (ast, mode) {
- ensureExpressionMode(mode, ast);
- return this._implicitReceiver;
- };
- /**
- * @param {?} ast
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.visitInterpolation = function (ast, mode) {
- ensureExpressionMode(mode, ast);
- var /** @type {?} */ args = [__WEBPACK_IMPORTED_MODULE_3__output_output_ast__["f" /* literal */](ast.expressions.length)];
- for (var /** @type {?} */ i = 0; i < ast.strings.length - 1; i++) {
- args.push(__WEBPACK_IMPORTED_MODULE_3__output_output_ast__["f" /* literal */](ast.strings[i]));
- args.push(this.visit(ast.expressions[i], _Mode.Expression));
- }
- args.push(__WEBPACK_IMPORTED_MODULE_3__output_output_ast__["f" /* literal */](ast.strings[ast.strings.length - 1]));
- return ast.expressions.length <= 9 ?
- __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["g" /* importExpr */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__identifiers__["a" /* createIdentifier */])(__WEBPACK_IMPORTED_MODULE_2__identifiers__["b" /* Identifiers */].inlineInterpolate)).callFn(args) :
- __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["g" /* importExpr */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__identifiers__["a" /* createIdentifier */])(__WEBPACK_IMPORTED_MODULE_2__identifiers__["b" /* Identifiers */].interpolate)).callFn([
- args[0], __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["h" /* literalArr */](args.slice(1))
- ]);
- };
- /**
- * @param {?} ast
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.visitKeyedRead = function (ast, mode) {
- var /** @type {?} */ leftMostSafe = this.leftMostSafeNode(ast);
- if (leftMostSafe) {
- return this.convertSafeAccess(ast, leftMostSafe, mode);
- }
- else {
- return convertToStatementIfNeeded(mode, this.visit(ast.obj, _Mode.Expression).key(this.visit(ast.key, _Mode.Expression)));
- }
- };
- /**
- * @param {?} ast
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.visitKeyedWrite = function (ast, mode) {
- var /** @type {?} */ obj = this.visit(ast.obj, _Mode.Expression);
- var /** @type {?} */ key = this.visit(ast.key, _Mode.Expression);
- var /** @type {?} */ value = this.visit(ast.value, _Mode.Expression);
- return convertToStatementIfNeeded(mode, obj.key(key).set(value));
- };
- /**
- * @param {?} ast
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.visitLiteralArray = function (ast, mode) {
- var /** @type {?} */ parts = this.visitAll(ast.expressions, mode);
- var /** @type {?} */ literalArr = this.isAction ? __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["h" /* literalArr */](parts) : createCachedLiteralArray(this._builder, parts);
- return convertToStatementIfNeeded(mode, literalArr);
- };
- /**
- * @param {?} ast
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.visitLiteralMap = function (ast, mode) {
- var /** @type {?} */ parts = [];
- for (var /** @type {?} */ i = 0; i < ast.keys.length; i++) {
- parts.push([ast.keys[i], this.visit(ast.values[i], _Mode.Expression)]);
- }
- var /** @type {?} */ literalMap = this.isAction ? __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["l" /* literalMap */](parts) : createCachedLiteralMap(this._builder, parts);
- return convertToStatementIfNeeded(mode, literalMap);
- };
- /**
- * @param {?} ast
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.visitLiteralPrimitive = function (ast, mode) {
- return convertToStatementIfNeeded(mode, __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["f" /* literal */](ast.value));
- };
- /**
- * @param {?} name
- * @return {?}
- */
- _AstToIrVisitor.prototype._getLocal = function (name) {
- if (this.isAction && name == EventHandlerVars.event.name) {
- return EventHandlerVars.event;
- }
- return this._nameResolver.getLocal(name);
- };
- /**
- * @param {?} ast
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.visitMethodCall = function (ast, mode) {
- var /** @type {?} */ leftMostSafe = this.leftMostSafeNode(ast);
- if (leftMostSafe) {
- return this.convertSafeAccess(ast, leftMostSafe, mode);
- }
- else {
- var /** @type {?} */ args = this.visitAll(ast.args, _Mode.Expression);
- var /** @type {?} */ result = null;
- var /** @type {?} */ receiver = this.visit(ast.receiver, _Mode.Expression);
- if (receiver === this._implicitReceiver) {
- var /** @type {?} */ varExpr = this._getLocal(ast.name);
- if (varExpr) {
- result = varExpr.callFn(args);
- }
- }
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["d" /* isBlank */])(result)) {
- result = receiver.callMethod(ast.name, args);
- }
- return convertToStatementIfNeeded(mode, result);
- }
- };
- /**
- * @param {?} ast
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.visitPrefixNot = function (ast, mode) {
- return convertToStatementIfNeeded(mode, __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["v" /* not */](this.visit(ast.expression, _Mode.Expression)));
- };
- /**
- * @param {?} ast
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.visitPropertyRead = function (ast, mode) {
- var /** @type {?} */ leftMostSafe = this.leftMostSafeNode(ast);
- if (leftMostSafe) {
- return this.convertSafeAccess(ast, leftMostSafe, mode);
- }
- else {
- var /** @type {?} */ result = null;
- var /** @type {?} */ receiver = this.visit(ast.receiver, _Mode.Expression);
- if (receiver === this._implicitReceiver) {
- result = this._getLocal(ast.name);
- }
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__["d" /* isBlank */])(result)) {
- result = receiver.prop(ast.name);
- }
- return convertToStatementIfNeeded(mode, result);
- }
- };
- /**
- * @param {?} ast
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.visitPropertyWrite = function (ast, mode) {
- var /** @type {?} */ receiver = this.visit(ast.receiver, _Mode.Expression);
- if (receiver === this._implicitReceiver) {
- var /** @type {?} */ varExpr = this._getLocal(ast.name);
- if (varExpr) {
- throw new Error('Cannot assign to a reference or variable!');
- }
- }
- return convertToStatementIfNeeded(mode, receiver.prop(ast.name).set(this.visit(ast.value, _Mode.Expression)));
- };
- /**
- * @param {?} ast
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.visitSafePropertyRead = function (ast, mode) {
- return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);
- };
- /**
- * @param {?} ast
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.visitSafeMethodCall = function (ast, mode) {
- return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);
- };
- /**
- * @param {?} asts
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.visitAll = function (asts, mode) {
- var _this = this;
- return asts.map(function (ast) { return _this.visit(ast, mode); });
- };
- /**
- * @param {?} ast
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.visitQuote = function (ast, mode) {
- throw new Error('Quotes are not supported for evaluation!');
- };
- /**
- * @param {?} ast
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.visit = function (ast, mode) {
- var /** @type {?} */ result = this._resultMap.get(ast);
- if (result)
- return result;
- return (this._nodeMap.get(ast) || ast).visit(this, mode);
- };
- /**
- * @param {?} ast
- * @param {?} leftMostSafe
- * @param {?} mode
- * @return {?}
- */
- _AstToIrVisitor.prototype.convertSafeAccess = function (ast, leftMostSafe, mode) {
- // If the expression contains a safe access node on the left it needs to be converted to
- // an expression that guards the access to the member by checking the receiver for blank. As
- // execution proceeds from left to right, the left most part of the expression must be guarded
- // first but, because member access is left associative, the right side of the expression is at
- // the top of the AST. The desired result requires lifting a copy of the the left part of the
- // expression up to test it for blank before generating the unguarded version.
- // Consider, for example the following expression: a?.b.c?.d.e
- // This results in the ast:
- // .
- // / \
- // ?. e
- // / \
- // . d
- // / \
- // ?. c
- // / \
- // a b
- // The following tree should be generated:
- //
- // /---- ? ----\
- // / | \
- // a /--- ? ---\ null
- // / | \
- // . . null
- // / \ / \
- // . c . e
- // / \ / \
- // a b , d
- // / \
- // . c
- // / \
- // a b
- //
- // Notice that the first guard condition is the left hand of the left most safe access node
- // which comes in as leftMostSafe to this routine.
- var /** @type {?} */ guardedExpression = this.visit(leftMostSafe.receiver, _Mode.Expression);
- var /** @type {?} */ temporary;
- if (this.needsTemporary(leftMostSafe.receiver)) {
- // If the expression has method calls or pipes then we need to save the result into a
- // temporary variable to avoid calling stateful or impure code more than once.
- temporary = this.allocateTemporary();
- // Preserve the result in the temporary variable
- guardedExpression = temporary.set(guardedExpression);
- // Ensure all further references to the guarded expression refer to the temporary instead.
- this._resultMap.set(leftMostSafe.receiver, temporary);
- }
- var /** @type {?} */ condition = guardedExpression.isBlank();
- // Convert the ast to an unguarded access to the receiver's member. The map will substitute
- // leftMostNode with its unguarded version in the call to `this.visit()`.
- if (leftMostSafe instanceof __WEBPACK_IMPORTED_MODULE_0__expression_parser_ast__["a" /* SafeMethodCall */]) {
- this._nodeMap.set(leftMostSafe, new __WEBPACK_IMPORTED_MODULE_0__expression_parser_ast__["b" /* MethodCall */](leftMostSafe.span, leftMostSafe.receiver, leftMostSafe.name, leftMostSafe.args));
- }
- else {
- this._nodeMap.set(leftMostSafe, new __WEBPACK_IMPORTED_MODULE_0__expression_parser_ast__["c" /* PropertyRead */](leftMostSafe.span, leftMostSafe.receiver, leftMostSafe.name));
- }
- // Recursively convert the node now without the guarded member access.
- var /** @type {?} */ access = this.visit(ast, _Mode.Expression);
- // Remove the mapping. This is not strictly required as the converter only traverses each node
- // once but is safer if the conversion is changed to traverse the nodes more than once.
- this._nodeMap.delete(leftMostSafe);
- // If we allcoated a temporary, release it.
- if (temporary) {
- this.releaseTemporary(temporary);
- }
- // Produce the conditional
- return convertToStatementIfNeeded(mode, condition.conditional(__WEBPACK_IMPORTED_MODULE_3__output_output_ast__["f" /* literal */](null), access));
- };
- /**
- * @param {?} ast
- * @return {?}
- */
- _AstToIrVisitor.prototype.leftMostSafeNode = function (ast) {
- var _this = this;
- var /** @type {?} */ visit = function (visitor, ast) {
- return (_this._nodeMap.get(ast) || ast).visit(visitor);
- };
- return ast.visit({
- /**
- * @param {?} ast
- * @return {?}
- */
- visitBinary: function (ast) { return null; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitChain: function (ast) { return null; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitConditional: function (ast) { return null; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitFunctionCall: function (ast) { return null; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitImplicitReceiver: function (ast) { return null; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitInterpolation: function (ast) { return null; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitKeyedRead: function (ast) { return visit(this, ast.obj); },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitKeyedWrite: function (ast) { return null; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitLiteralArray: function (ast) { return null; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitLiteralMap: function (ast) { return null; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitLiteralPrimitive: function (ast) { return null; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitMethodCall: function (ast) { return visit(this, ast.receiver); },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitPipe: function (ast) { return null; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitPrefixNot: function (ast) { return null; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitPropertyRead: function (ast) { return visit(this, ast.receiver); },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitPropertyWrite: function (ast) { return null; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitQuote: function (ast) { return null; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitSafeMethodCall: function (ast) { return visit(this, ast.receiver) || ast; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitSafePropertyRead: function (ast) {
- return visit(this, ast.receiver) || ast;
- }
- });
- };
- /**
- * @param {?} ast
- * @return {?}
- */
- _AstToIrVisitor.prototype.needsTemporary = function (ast) {
- var _this = this;
- var /** @type {?} */ visit = function (visitor, ast) {
- return ast && (_this._nodeMap.get(ast) || ast).visit(visitor);
- };
- var /** @type {?} */ visitSome = function (visitor, ast) {
- return ast.some(function (ast) { return visit(visitor, ast); });
- };
- return ast.visit({
- /**
- * @param {?} ast
- * @return {?}
- */
- visitBinary: function (ast) { return visit(this, ast.left) || visit(this, ast.right); },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitChain: function (ast) { return false; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitConditional: function (ast) {
- return visit(this, ast.condition) || visit(this, ast.trueExp) ||
- visit(this, ast.falseExp);
- },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitFunctionCall: function (ast) { return true; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitImplicitReceiver: function (ast) { return false; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitInterpolation: function (ast) { return visitSome(this, ast.expressions); },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitKeyedRead: function (ast) { return false; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitKeyedWrite: function (ast) { return false; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitLiteralArray: function (ast) { return true; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitLiteralMap: function (ast) { return true; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitLiteralPrimitive: function (ast) { return false; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitMethodCall: function (ast) { return true; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitPipe: function (ast) { return true; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitPrefixNot: function (ast) { return visit(this, ast.expression); },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitPropertyRead: function (ast) { return false; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitPropertyWrite: function (ast) { return false; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitQuote: function (ast) { return false; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitSafeMethodCall: function (ast) { return true; },
- /**
- * @param {?} ast
- * @return {?}
- */
- visitSafePropertyRead: function (ast) { return false; }
- });
- };
- /**
- * @return {?}
- */
- _AstToIrVisitor.prototype.allocateTemporary = function () {
- var /** @type {?} */ tempNumber = this._currentTemporary++;
- this.temporaryCount = Math.max(this._currentTemporary, this.temporaryCount);
- return new __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["A" /* ReadVarExpr */](temporaryName(this.bindingId, tempNumber));
- };
- /**
- * @param {?} temporary
- * @return {?}
- */
- _AstToIrVisitor.prototype.releaseTemporary = function (temporary) {
- this._currentTemporary--;
- if (temporary.name != temporaryName(this.bindingId, this._currentTemporary)) {
- throw new Error("Temporary " + temporary.name + " released out of order");
- }
- };
- return _AstToIrVisitor;
-}());
-function _AstToIrVisitor_tsickle_Closure_declarations() {
- /** @type {?} */
- _AstToIrVisitor.prototype._nodeMap;
- /** @type {?} */
- _AstToIrVisitor.prototype._resultMap;
- /** @type {?} */
- _AstToIrVisitor.prototype._currentTemporary;
- /** @type {?} */
- _AstToIrVisitor.prototype.needsValueUnwrapper;
- /** @type {?} */
- _AstToIrVisitor.prototype.temporaryCount;
- /** @type {?} */
- _AstToIrVisitor.prototype._builder;
- /** @type {?} */
- _AstToIrVisitor.prototype._nameResolver;
- /** @type {?} */
- _AstToIrVisitor.prototype._implicitReceiver;
- /** @type {?} */
- _AstToIrVisitor.prototype._valueUnwrapper;
- /** @type {?} */
- _AstToIrVisitor.prototype.bindingId;
- /** @type {?} */
- _AstToIrVisitor.prototype.isAction;
-}
-/**
- * @param {?} arg
- * @param {?} output
- * @return {?}
- */
-function flattenStatements(arg, output) {
- if (Array.isArray(arg)) {
- ((arg)).forEach(function (entry) { return flattenStatements(entry, output); });
- }
- else {
- output.push(arg);
- }
-}
-/**
- * @param {?} builder
- * @param {?} values
- * @return {?}
- */
-function createCachedLiteralArray(builder, values) {
- if (values.length === 0) {
- return __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["g" /* importExpr */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__identifiers__["a" /* createIdentifier */])(__WEBPACK_IMPORTED_MODULE_2__identifiers__["b" /* Identifiers */].EMPTY_ARRAY));
- }
- var /** @type {?} */ proxyExpr = __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["e" /* THIS_EXPR */].prop("_arr_" + builder.fields.length);
- var /** @type {?} */ proxyParams = [];
- var /** @type {?} */ proxyReturnEntries = [];
- for (var /** @type {?} */ i = 0; i < values.length; i++) {
- var /** @type {?} */ paramName = "p" + i;
- proxyParams.push(new __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["o" /* FnParam */](paramName));
- proxyReturnEntries.push(__WEBPACK_IMPORTED_MODULE_3__output_output_ast__["a" /* variable */](paramName));
- }
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__identifier_util__["c" /* createPureProxy */])(__WEBPACK_IMPORTED_MODULE_3__output_output_ast__["B" /* fn */](proxyParams, [new __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["t" /* ReturnStatement */](__WEBPACK_IMPORTED_MODULE_3__output_output_ast__["h" /* literalArr */](proxyReturnEntries))], new __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["i" /* ArrayType */](__WEBPACK_IMPORTED_MODULE_3__output_output_ast__["m" /* DYNAMIC_TYPE */])), values.length, proxyExpr, builder);
- return proxyExpr.callFn(values);
-}
-/**
- * @param {?} builder
- * @param {?} entries
- * @return {?}
- */
-function createCachedLiteralMap(builder, entries) {
- if (entries.length === 0) {
- return __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["g" /* importExpr */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__identifiers__["a" /* createIdentifier */])(__WEBPACK_IMPORTED_MODULE_2__identifiers__["b" /* Identifiers */].EMPTY_MAP));
- }
- var /** @type {?} */ proxyExpr = __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["e" /* THIS_EXPR */].prop("_map_" + builder.fields.length);
- var /** @type {?} */ proxyParams = [];
- var /** @type {?} */ proxyReturnEntries = [];
- var /** @type {?} */ values = [];
- for (var /** @type {?} */ i = 0; i < entries.length; i++) {
- var /** @type {?} */ paramName = "p" + i;
- proxyParams.push(new __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["o" /* FnParam */](paramName));
- proxyReturnEntries.push([entries[i][0], __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["a" /* variable */](paramName)]);
- values.push(/** @type {?} */ (entries[i][1]));
- }
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__identifier_util__["c" /* createPureProxy */])(__WEBPACK_IMPORTED_MODULE_3__output_output_ast__["B" /* fn */](proxyParams, [new __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["t" /* ReturnStatement */](__WEBPACK_IMPORTED_MODULE_3__output_output_ast__["l" /* literalMap */](proxyReturnEntries))], new __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["n" /* MapType */](__WEBPACK_IMPORTED_MODULE_3__output_output_ast__["m" /* DYNAMIC_TYPE */])), entries.length, proxyExpr, builder);
- return proxyExpr.callFn(values);
-}
-var DefaultNameResolver = (function () {
- function DefaultNameResolver() {
- }
- /**
- * @param {?} name
- * @param {?} input
- * @param {?} args
- * @return {?}
- */
- DefaultNameResolver.prototype.callPipe = function (name, input, args) { return null; };
- /**
- * @param {?} name
- * @return {?}
- */
- DefaultNameResolver.prototype.getLocal = function (name) { return null; };
- return DefaultNameResolver;
-}());
-/**
- * @param {?} bindingId
- * @return {?}
- */
-function createCurrValueExpr(bindingId) {
- return __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["a" /* variable */]("currVal_" + bindingId); // fix syntax highlighting: `
-}
-/**
- * @param {?} bindingId
- * @return {?}
- */
-function createPreventDefaultVar(bindingId) {
- return __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["a" /* variable */]("pd_" + bindingId);
-}
-/**
- * @param {?} stmt
- * @return {?}
- */
-function convertStmtIntoExpression(stmt) {
- if (stmt instanceof __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["C" /* ExpressionStatement */]) {
- return stmt.expr;
- }
- else if (stmt instanceof __WEBPACK_IMPORTED_MODULE_3__output_output_ast__["t" /* ReturnStatement */]) {
- return stmt.value;
- }
- return null;
-}
-//# sourceMappingURL=expression_converter.js.map
-
-/***/ }),
-/* 113 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__compile_metadata__ = __webpack_require__(15);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__config__ = __webpack_require__(66);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__facade_lang__ = __webpack_require__(6);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__injectable__ = __webpack_require__(20);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ml_parser_ast__ = __webpack_require__(68);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ml_parser_html_parser__ = __webpack_require__(79);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ml_parser_interpolation_config__ = __webpack_require__(46);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__resource_loader__ = __webpack_require__(232);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__style_url_resolver__ = __webpack_require__(348);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__template_parser_template_preparser__ = __webpack_require__(350);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__url_resolver__ = __webpack_require__(81);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__util__ = __webpack_require__(32);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DirectiveNormalizer; });
-/**
- * @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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-var __metadata = (this && this.__metadata) || function (k, v) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-var DirectiveNormalizer = (function () {
- /**
- * @param {?} _resourceLoader
- * @param {?} _urlResolver
- * @param {?} _htmlParser
- * @param {?} _config
- */
- function DirectiveNormalizer(_resourceLoader, _urlResolver, _htmlParser, _config) {
- this._resourceLoader = _resourceLoader;
- this._urlResolver = _urlResolver;
- this._htmlParser = _htmlParser;
- this._config = _config;
- this._resourceLoaderCache = new Map();
- }
- /**
- * @return {?}
- */
- DirectiveNormalizer.prototype.clearCache = function () { this._resourceLoaderCache.clear(); };
- /**
- * @param {?} normalizedDirective
- * @return {?}
- */
- DirectiveNormalizer.prototype.clearCacheFor = function (normalizedDirective) {
- var _this = this;
- if (!normalizedDirective.isComponent) {
- return;
- }
- this._resourceLoaderCache.delete(normalizedDirective.template.templateUrl);
- normalizedDirective.template.externalStylesheets.forEach(function (stylesheet) { _this._resourceLoaderCache.delete(stylesheet.moduleUrl); });
- };
- /**
- * @param {?} url
- * @return {?}
- */
- DirectiveNormalizer.prototype._fetch = function (url) {
- var /** @type {?} */ result = this._resourceLoaderCache.get(url);
- if (!result) {
- result = this._resourceLoader.get(url);
- this._resourceLoaderCache.set(url, result);
- }
- return result;
- };
- /**
- * @param {?} prenormData
- * @return {?}
- */
- DirectiveNormalizer.prototype.normalizeTemplate = function (prenormData) {
- var _this = this;
- var /** @type {?} */ normalizedTemplateSync = null;
- var /** @type {?} */ normalizedTemplateAsync;
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__facade_lang__["c" /* isPresent */])(prenormData.template)) {
- normalizedTemplateSync = this.normalizeTemplateSync(prenormData);
- normalizedTemplateAsync = Promise.resolve(normalizedTemplateSync);
- }
- else if (prenormData.templateUrl) {
- normalizedTemplateAsync = this.normalizeTemplateAsync(prenormData);
- }
- else {
- throw new __WEBPACK_IMPORTED_MODULE_12__util__["e" /* SyntaxError */]("No template specified for component " + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__facade_lang__["e" /* stringify */])(prenormData.componentType));
- }
- if (normalizedTemplateSync && normalizedTemplateSync.styleUrls.length === 0) {
- // sync case
- return new __WEBPACK_IMPORTED_MODULE_12__util__["h" /* SyncAsyncResult */](normalizedTemplateSync);
- }
- else {
- // async case
- return new __WEBPACK_IMPORTED_MODULE_12__util__["h" /* SyncAsyncResult */](null, normalizedTemplateAsync.then(function (normalizedTemplate) { return _this.normalizeExternalStylesheets(normalizedTemplate); }));
- }
- };
- /**
- * @param {?} prenomData
- * @return {?}
- */
- DirectiveNormalizer.prototype.normalizeTemplateSync = function (prenomData) {
- return this.normalizeLoadedTemplate(prenomData, prenomData.template, prenomData.moduleUrl);
- };
- /**
- * @param {?} prenomData
- * @return {?}
- */
- DirectiveNormalizer.prototype.normalizeTemplateAsync = function (prenomData) {
- var _this = this;
- var /** @type {?} */ templateUrl = this._urlResolver.resolve(prenomData.moduleUrl, prenomData.templateUrl);
- return this._fetch(templateUrl)
- .then(function (value) { return _this.normalizeLoadedTemplate(prenomData, value, templateUrl); });
- };
- /**
- * @param {?} prenomData
- * @param {?} template
- * @param {?} templateAbsUrl
- * @return {?}
- */
- DirectiveNormalizer.prototype.normalizeLoadedTemplate = function (prenomData, template, templateAbsUrl) {
- var /** @type {?} */ interpolationConfig = __WEBPACK_IMPORTED_MODULE_7__ml_parser_interpolation_config__["b" /* InterpolationConfig */].fromArray(prenomData.interpolation);
- var /** @type {?} */ rootNodesAndErrors = this._htmlParser.parse(template, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__facade_lang__["e" /* stringify */])(prenomData.componentType), true, interpolationConfig);
- if (rootNodesAndErrors.errors.length > 0) {
- var /** @type {?} */ errorString = rootNodesAndErrors.errors.join('\n');
- throw new __WEBPACK_IMPORTED_MODULE_12__util__["e" /* SyntaxError */]("Template parse errors:\n" + errorString);
- }
- var /** @type {?} */ templateMetadataStyles = this.normalizeStylesheet(new __WEBPACK_IMPORTED_MODULE_1__compile_metadata__["l" /* CompileStylesheetMetadata */]({
- styles: prenomData.styles,
- styleUrls: prenomData.styleUrls,
- moduleUrl: prenomData.moduleUrl
- }));
- var /** @type {?} */ visitor = new TemplatePreparseVisitor();
- __WEBPACK_IMPORTED_MODULE_5__ml_parser_ast__["g" /* visitAll */](visitor, rootNodesAndErrors.rootNodes);
- var /** @type {?} */ templateStyles = this.normalizeStylesheet(new __WEBPACK_IMPORTED_MODULE_1__compile_metadata__["l" /* CompileStylesheetMetadata */]({ styles: visitor.styles, styleUrls: visitor.styleUrls, moduleUrl: templateAbsUrl }));
- var /** @type {?} */ encapsulation = prenomData.encapsulation;
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__facade_lang__["d" /* isBlank */])(encapsulation)) {
- encapsulation = this._config.defaultEncapsulation;
- }
- var /** @type {?} */ styles = templateMetadataStyles.styles.concat(templateStyles.styles);
- var /** @type {?} */ styleUrls = templateMetadataStyles.styleUrls.concat(templateStyles.styleUrls);
- if (encapsulation === __WEBPACK_IMPORTED_MODULE_0__angular_core__["O" /* ViewEncapsulation */].Emulated && styles.length === 0 &&
- styleUrls.length === 0) {
- encapsulation = __WEBPACK_IMPORTED_MODULE_0__angular_core__["O" /* ViewEncapsulation */].None;
- }
- return new __WEBPACK_IMPORTED_MODULE_1__compile_metadata__["p" /* CompileTemplateMetadata */]({
- encapsulation: encapsulation,
- template: template,
- templateUrl: templateAbsUrl, styles: styles, styleUrls: styleUrls,
- ngContentSelectors: visitor.ngContentSelectors,
- animations: prenomData.animations,
- interpolation: prenomData.interpolation,
- });
- };
- /**
- * @param {?} templateMeta
- * @return {?}
- */
- DirectiveNormalizer.prototype.normalizeExternalStylesheets = function (templateMeta) {
- return this._loadMissingExternalStylesheets(templateMeta.styleUrls)
- .then(function (externalStylesheets) { return new __WEBPACK_IMPORTED_MODULE_1__compile_metadata__["p" /* CompileTemplateMetadata */]({
- encapsulation: templateMeta.encapsulation,
- template: templateMeta.template,
- templateUrl: templateMeta.templateUrl,
- styles: templateMeta.styles,
- styleUrls: templateMeta.styleUrls,
- externalStylesheets: externalStylesheets,
- ngContentSelectors: templateMeta.ngContentSelectors,
- animations: templateMeta.animations,
- interpolation: templateMeta.interpolation
- }); });
- };
- /**
- * @param {?} styleUrls
- * @param {?=} loadedStylesheets
- * @return {?}
- */
- DirectiveNormalizer.prototype._loadMissingExternalStylesheets = function (styleUrls, loadedStylesheets) {
- var _this = this;
- if (loadedStylesheets === void 0) { loadedStylesheets = new Map(); }
- return Promise
- .all(styleUrls.filter(function (styleUrl) { return !loadedStylesheets.has(styleUrl); })
- .map(function (styleUrl) { return _this._fetch(styleUrl).then(function (loadedStyle) {
- var /** @type {?} */ stylesheet = _this.normalizeStylesheet(new __WEBPACK_IMPORTED_MODULE_1__compile_metadata__["l" /* CompileStylesheetMetadata */]({ styles: [loadedStyle], moduleUrl: styleUrl }));
- loadedStylesheets.set(styleUrl, stylesheet);
- return _this._loadMissingExternalStylesheets(stylesheet.styleUrls, loadedStylesheets);
- }); }))
- .then(function (_) { return Array.from(loadedStylesheets.values()); });
- };
- /**
- * @param {?} stylesheet
- * @return {?}
- */
- DirectiveNormalizer.prototype.normalizeStylesheet = function (stylesheet) {
- var _this = this;
- var /** @type {?} */ allStyleUrls = stylesheet.styleUrls.filter(__WEBPACK_IMPORTED_MODULE_9__style_url_resolver__["a" /* isStyleUrlResolvable */])
- .map(function (url) { return _this._urlResolver.resolve(stylesheet.moduleUrl, url); });
- var /** @type {?} */ allStyles = stylesheet.styles.map(function (style) {
- var /** @type {?} */ styleWithImports = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__style_url_resolver__["b" /* extractStyleUrls */])(_this._urlResolver, stylesheet.moduleUrl, style);
- allStyleUrls.push.apply(allStyleUrls, styleWithImports.styleUrls);
- return styleWithImports.style;
- });
- return new __WEBPACK_IMPORTED_MODULE_1__compile_metadata__["l" /* CompileStylesheetMetadata */]({ styles: allStyles, styleUrls: allStyleUrls, moduleUrl: stylesheet.moduleUrl });
- };
- DirectiveNormalizer = __decorate([
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__injectable__["a" /* CompilerInjectable */])(),
- __metadata('design:paramtypes', [__WEBPACK_IMPORTED_MODULE_8__resource_loader__["a" /* ResourceLoader */], __WEBPACK_IMPORTED_MODULE_11__url_resolver__["a" /* UrlResolver */], __WEBPACK_IMPORTED_MODULE_6__ml_parser_html_parser__["a" /* HtmlParser */], __WEBPACK_IMPORTED_MODULE_2__config__["a" /* CompilerConfig */]])
- ], DirectiveNormalizer);
- return DirectiveNormalizer;
-}());
-function DirectiveNormalizer_tsickle_Closure_declarations() {
- /** @type {?} */
- DirectiveNormalizer.prototype._resourceLoaderCache;
- /** @type {?} */
- DirectiveNormalizer.prototype._resourceLoader;
- /** @type {?} */
- DirectiveNormalizer.prototype._urlResolver;
- /** @type {?} */
- DirectiveNormalizer.prototype._htmlParser;
- /** @type {?} */
- DirectiveNormalizer.prototype._config;
-}
-var TemplatePreparseVisitor = (function () {
- function TemplatePreparseVisitor() {
- this.ngContentSelectors = [];
- this.styles = [];
- this.styleUrls = [];
- this.ngNonBindableStackCount = 0;
- }
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- TemplatePreparseVisitor.prototype.visitElement = function (ast, context) {
- var /** @type {?} */ preparsedElement = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__template_parser_template_preparser__["a" /* preparseElement */])(ast);
- switch (preparsedElement.type) {
- case __WEBPACK_IMPORTED_MODULE_10__template_parser_template_preparser__["b" /* PreparsedElementType */].NG_CONTENT:
- if (this.ngNonBindableStackCount === 0) {
- this.ngContentSelectors.push(preparsedElement.selectAttr);
- }
- break;
- case __WEBPACK_IMPORTED_MODULE_10__template_parser_template_preparser__["b" /* PreparsedElementType */].STYLE:
- var /** @type {?} */ textContent_1 = '';
- ast.children.forEach(function (child) {
- if (child instanceof __WEBPACK_IMPORTED_MODULE_5__ml_parser_ast__["d" /* Text */]) {
- textContent_1 += child.value;
- }
- });
- this.styles.push(textContent_1);
- break;
- case __WEBPACK_IMPORTED_MODULE_10__template_parser_template_preparser__["b" /* PreparsedElementType */].STYLESHEET:
- this.styleUrls.push(preparsedElement.hrefAttr);
- break;
- default:
- break;
- }
- if (preparsedElement.nonBindable) {
- this.ngNonBindableStackCount++;
- }
- __WEBPACK_IMPORTED_MODULE_5__ml_parser_ast__["g" /* visitAll */](this, ast.children);
- if (preparsedElement.nonBindable) {
- this.ngNonBindableStackCount--;
- }
- return null;
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- TemplatePreparseVisitor.prototype.visitExpansion = function (ast, context) { __WEBPACK_IMPORTED_MODULE_5__ml_parser_ast__["g" /* visitAll */](this, ast.cases); };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- TemplatePreparseVisitor.prototype.visitExpansionCase = function (ast, context) {
- __WEBPACK_IMPORTED_MODULE_5__ml_parser_ast__["g" /* visitAll */](this, ast.expression);
- };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- TemplatePreparseVisitor.prototype.visitComment = function (ast, context) { return null; };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- TemplatePreparseVisitor.prototype.visitAttribute = function (ast, context) { return null; };
- /**
- * @param {?} ast
- * @param {?} context
- * @return {?}
- */
- TemplatePreparseVisitor.prototype.visitText = function (ast, context) { return null; };
- return TemplatePreparseVisitor;
-}());
-function TemplatePreparseVisitor_tsickle_Closure_declarations() {
- /** @type {?} */
- TemplatePreparseVisitor.prototype.ngContentSelectors;
- /** @type {?} */
- TemplatePreparseVisitor.prototype.styles;
- /** @type {?} */
- TemplatePreparseVisitor.prototype.styleUrls;
- /** @type {?} */
- TemplatePreparseVisitor.prototype.ngNonBindableStackCount;
-}
-//# sourceMappingURL=directive_normalizer.js.map
-
-/***/ }),
-/* 114 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__facade_collection__ = __webpack_require__(78);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__facade_lang__ = __webpack_require__(6);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__injectable__ = __webpack_require__(20);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__private_import_core__ = __webpack_require__(17);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util__ = __webpack_require__(32);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DirectiveResolver; });
-/**
- * @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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-var __metadata = (this && this.__metadata) || function (k, v) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
-};
-
-
-
-
-
-
-var DirectiveResolver = (function () {
- /**
- * @param {?=} _reflector
- */
- function DirectiveResolver(_reflector) {
- if (_reflector === void 0) { _reflector = __WEBPACK_IMPORTED_MODULE_4__private_import_core__["c" /* reflector */]; }
- this._reflector = _reflector;
- }
- /**
- * @param {?} type
- * @return {?}
- */
- DirectiveResolver.prototype.isDirective = function (type) {
- var /** @type {?} */ typeMetadata = this._reflector.annotations(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_11" /* resolveForwardRef */])(type));
- return typeMetadata && typeMetadata.some(isDirectiveMetadata);
- };
- /**
- * Return {\@link Directive} for a given `Type`.
- * @param {?} type
- * @param {?=} throwIfNotFound
- * @return {?}
- */
- DirectiveResolver.prototype.resolve = function (type, throwIfNotFound) {
- if (throwIfNotFound === void 0) { throwIfNotFound = true; }
- var /** @type {?} */ typeMetadata = this._reflector.annotations(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_11" /* resolveForwardRef */])(type));
- if (typeMetadata) {
- var /** @type {?} */ metadata = __WEBPACK_IMPORTED_MODULE_1__facade_collection__["b" /* ListWrapper */].findLast(typeMetadata, isDirectiveMetadata);
- if (metadata) {
- var /** @type {?} */ propertyMetadata = this._reflector.propMetadata(type);
- return this._mergeWithPropertyMetadata(metadata, propertyMetadata, type);
- }
- }
- if (throwIfNotFound) {
- throw new Error("No Directive annotation found on " + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__facade_lang__["e" /* stringify */])(type));
- }
- return null;
- };
- /**
- * @param {?} dm
- * @param {?} propertyMetadata
- * @param {?} directiveType
- * @return {?}
- */
- DirectiveResolver.prototype._mergeWithPropertyMetadata = function (dm, propertyMetadata, directiveType) {
- var /** @type {?} */ inputs = [];
- var /** @type {?} */ outputs = [];
- var /** @type {?} */ host = {};
- var /** @type {?} */ queries = {};
- Object.keys(propertyMetadata).forEach(function (propName) {
- var /** @type {?} */ input = __WEBPACK_IMPORTED_MODULE_1__facade_collection__["b" /* ListWrapper */].findLast(propertyMetadata[propName], function (a) { return a instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* Input */]; });
- if (input) {
- if (input.bindingPropertyName) {
- inputs.push(propName + ": " + input.bindingPropertyName);
- }
- else {
- inputs.push(propName);
- }
- }
- var /** @type {?} */ output = __WEBPACK_IMPORTED_MODULE_1__facade_collection__["b" /* ListWrapper */].findLast(propertyMetadata[propName], function (a) { return a instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["_15" /* Output */]; });
- if (output) {
- if (output.bindingPropertyName) {
- outputs.push(propName + ": " + output.bindingPropertyName);
- }
- else {
- outputs.push(propName);
- }
- }
- var /** @type {?} */ hostBindings = propertyMetadata[propName].filter(function (a) { return a && a instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["_16" /* HostBinding */]; });
- hostBindings.forEach(function (hostBinding) {
- if (hostBinding.hostPropertyName) {
- var /** @type {?} */ startWith = hostBinding.hostPropertyName[0];
- if (startWith === '(') {
- throw new Error("@HostBinding can not bind to events. Use @HostListener instead.");
- }
- else if (startWith === '[') {
- throw new Error("@HostBinding parameter should be a property name, 'class.', or 'attr.'.");
- }
- host[("[" + hostBinding.hostPropertyName + "]")] = propName;
- }
- else {
- host[("[" + propName + "]")] = propName;
- }
- });
- var /** @type {?} */ hostListeners = propertyMetadata[propName].filter(function (a) { return a && a instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["_17" /* HostListener */]; });
- hostListeners.forEach(function (hostListener) {
- var /** @type {?} */ args = hostListener.args || [];
- host[("(" + hostListener.eventName + ")")] = propName + "(" + args.join(',') + ")";
- });
- var /** @type {?} */ query = __WEBPACK_IMPORTED_MODULE_1__facade_collection__["b" /* ListWrapper */].findLast(propertyMetadata[propName], function (a) { return a instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* Query */]; });
- if (query) {
- queries[propName] = query;
- }
- });
- return this._merge(dm, inputs, outputs, host, queries, directiveType);
- };
- /**
- * @param {?} def
- * @return {?}
- */
- DirectiveResolver.prototype._extractPublicName = function (def) { return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__util__["a" /* splitAtColon */])(def, [null, def])[1].trim(); };
- /**
- * @param {?} bindings
- * @return {?}
- */
- DirectiveResolver.prototype._dedupeBindings = function (bindings) {
- var /** @type {?} */ names = new Set();
- var /** @type {?} */ reversedResult = [];
- // go last to first to allow later entries to overwrite previous entries
- for (var /** @type {?} */ i = bindings.length - 1; i >= 0; i--) {
- var /** @type {?} */ binding = bindings[i];
- var /** @type {?} */ name_1 = this._extractPublicName(binding);
- if (!names.has(name_1)) {
- names.add(name_1);
- reversedResult.push(binding);
- }
- }
- return reversedResult.reverse();
- };
- /**
- * @param {?} directive
- * @param {?} inputs
- * @param {?} outputs
- * @param {?} host
- * @param {?} queries
- * @param {?} directiveType
- * @return {?}
- */
- DirectiveResolver.prototype._merge = function (directive, inputs, outputs, host, queries, directiveType) {
- var /** @type {?} */ mergedInputs = this._dedupeBindings(directive.inputs ? directive.inputs.concat(inputs) : inputs);
- var /** @type {?} */ mergedOutputs = this._dedupeBindings(directive.outputs ? directive.outputs.concat(outputs) : outputs);
- var /** @type {?} */ mergedHost = directive.host ? __WEBPACK_IMPORTED_MODULE_1__facade_collection__["a" /* StringMapWrapper */].merge(directive.host, host) : host;
- var /** @type {?} */ mergedQueries = directive.queries ? __WEBPACK_IMPORTED_MODULE_1__facade_collection__["a" /* StringMapWrapper */].merge(directive.queries, queries) : queries;
- if (directive instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* Component */]) {
- return new __WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* Component */]({
- selector: directive.selector,
- inputs: mergedInputs,
- outputs: mergedOutputs,
- host: mergedHost,
- exportAs: directive.exportAs,
- moduleId: directive.moduleId,
- queries: mergedQueries,
- changeDetection: directive.changeDetection,
- providers: directive.providers,
- viewProviders: directive.viewProviders,
- entryComponents: directive.entryComponents,
- template: directive.template,
- templateUrl: directive.templateUrl,
- styles: directive.styles,
- styleUrls: directive.styleUrls,
- encapsulation: directive.encapsulation,
- animations: directive.animations,
- interpolation: directive.interpolation
- });
- }
- else {
- return new __WEBPACK_IMPORTED_MODULE_0__angular_core__["v" /* Directive */]({
- selector: directive.selector,
- inputs: mergedInputs,
- outputs: mergedOutputs,
- host: mergedHost,
- exportAs: directive.exportAs,
- queries: mergedQueries,
- providers: directive.providers
- });
- }
- };
- DirectiveResolver = __decorate([
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__injectable__["a" /* CompilerInjectable */])(),
- __metadata('design:paramtypes', [__WEBPACK_IMPORTED_MODULE_4__private_import_core__["K" /* ReflectorReader */]])
- ], DirectiveResolver);
- return DirectiveResolver;
-}());
-function DirectiveResolver_tsickle_Closure_declarations() {
- /** @type {?} */
- DirectiveResolver.prototype._reflector;
-}
-/**
- * @param {?} type
- * @return {?}
- */
-function isDirectiveMetadata(type) {
- return type instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["v" /* Directive */];
-}
-//# sourceMappingURL=directive_resolver.js.map
-
-/***/ }),
-/* 115 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__chars__ = __webpack_require__(155);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__facade_lang__ = __webpack_require__(6);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__injectable__ = __webpack_require__(20);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return TokenType; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return Lexer; });
-/* unused harmony export Token */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return EOF; });
-/* harmony export (immutable) */ __webpack_exports__["a"] = isIdentifier;
-/* harmony export (immutable) */ __webpack_exports__["b"] = isQuote;
-/**
- * @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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-var __metadata = (this && this.__metadata) || function (k, v) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
-};
-
-
-
-var TokenType = {};
-TokenType.Character = 0;
-TokenType.Identifier = 1;
-TokenType.Keyword = 2;
-TokenType.String = 3;
-TokenType.Operator = 4;
-TokenType.Number = 5;
-TokenType.Error = 6;
-TokenType[TokenType.Character] = "Character";
-TokenType[TokenType.Identifier] = "Identifier";
-TokenType[TokenType.Keyword] = "Keyword";
-TokenType[TokenType.String] = "String";
-TokenType[TokenType.Operator] = "Operator";
-TokenType[TokenType.Number] = "Number";
-TokenType[TokenType.Error] = "Error";
-var /** @type {?} */ KEYWORDS = ['var', 'let', 'null', 'undefined', 'true', 'false', 'if', 'else', 'this'];
-var Lexer = (function () {
- function Lexer() {
- }
- /**
- * @param {?} text
- * @return {?}
- */
- Lexer.prototype.tokenize = function (text) {
- var /** @type {?} */ scanner = new _Scanner(text);
- var /** @type {?} */ tokens = [];
- var /** @type {?} */ token = scanner.scanToken();
- while (token != null) {
- tokens.push(token);
- token = scanner.scanToken();
- }
- return tokens;
- };
- Lexer = __decorate([
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__injectable__["a" /* CompilerInjectable */])(),
- __metadata('design:paramtypes', [])
- ], Lexer);
- return Lexer;
-}());
-var Token = (function () {
- /**
- * @param {?} index
- * @param {?} type
- * @param {?} numValue
- * @param {?} strValue
- */
- function Token(index, type, numValue, strValue) {
- this.index = index;
- this.type = type;
- this.numValue = numValue;
- this.strValue = strValue;
- }
- /**
- * @param {?} code
- * @return {?}
- */
- Token.prototype.isCharacter = function (code) {
- return this.type == TokenType.Character && this.numValue == code;
- };
- /**
- * @return {?}
- */
- Token.prototype.isNumber = function () { return this.type == TokenType.Number; };
- /**
- * @return {?}
- */
- Token.prototype.isString = function () { return this.type == TokenType.String; };
- /**
- * @param {?} operater
- * @return {?}
- */
- Token.prototype.isOperator = function (operater) {
- return this.type == TokenType.Operator && this.strValue == operater;
- };
- /**
- * @return {?}
- */
- Token.prototype.isIdentifier = function () { return this.type == TokenType.Identifier; };
- /**
- * @return {?}
- */
- Token.prototype.isKeyword = function () { return this.type == TokenType.Keyword; };
- /**
- * @return {?}
- */
- Token.prototype.isKeywordLet = function () { return this.type == TokenType.Keyword && this.strValue == 'let'; };
- /**
- * @return {?}
- */
- Token.prototype.isKeywordNull = function () { return this.type == TokenType.Keyword && this.strValue == 'null'; };
- /**
- * @return {?}
- */
- Token.prototype.isKeywordUndefined = function () {
- return this.type == TokenType.Keyword && this.strValue == 'undefined';
- };
- /**
- * @return {?}
- */
- Token.prototype.isKeywordTrue = function () { return this.type == TokenType.Keyword && this.strValue == 'true'; };
- /**
- * @return {?}
- */
- Token.prototype.isKeywordFalse = function () { return this.type == TokenType.Keyword && this.strValue == 'false'; };
- /**
- * @return {?}
- */
- Token.prototype.isKeywordThis = function () { return this.type == TokenType.Keyword && this.strValue == 'this'; };
- /**
- * @return {?}
- */
- Token.prototype.isError = function () { return this.type == TokenType.Error; };
- /**
- * @return {?}
- */
- Token.prototype.toNumber = function () { return this.type == TokenType.Number ? this.numValue : -1; };
- /**
- * @return {?}
- */
- Token.prototype.toString = function () {
- switch (this.type) {
- case TokenType.Character:
- case TokenType.Identifier:
- case TokenType.Keyword:
- case TokenType.Operator:
- case TokenType.String:
- case TokenType.Error:
- return this.strValue;
- case TokenType.Number:
- return this.numValue.toString();
- default:
- return null;
- }
- };
- return Token;
-}());
-function Token_tsickle_Closure_declarations() {
- /** @type {?} */
- Token.prototype.index;
- /** @type {?} */
- Token.prototype.type;
- /** @type {?} */
- Token.prototype.numValue;
- /** @type {?} */
- Token.prototype.strValue;
-}
-/**
- * @param {?} index
- * @param {?} code
- * @return {?}
- */
-function newCharacterToken(index, code) {
- return new Token(index, TokenType.Character, code, String.fromCharCode(code));
-}
-/**
- * @param {?} index
- * @param {?} text
- * @return {?}
- */
-function newIdentifierToken(index, text) {
- return new Token(index, TokenType.Identifier, 0, text);
-}
-/**
- * @param {?} index
- * @param {?} text
- * @return {?}
- */
-function newKeywordToken(index, text) {
- return new Token(index, TokenType.Keyword, 0, text);
-}
-/**
- * @param {?} index
- * @param {?} text
- * @return {?}
- */
-function newOperatorToken(index, text) {
- return new Token(index, TokenType.Operator, 0, text);
-}
-/**
- * @param {?} index
- * @param {?} text
- * @return {?}
- */
-function newStringToken(index, text) {
- return new Token(index, TokenType.String, 0, text);
-}
-/**
- * @param {?} index
- * @param {?} n
- * @return {?}
- */
-function newNumberToken(index, n) {
- return new Token(index, TokenType.Number, n, '');
-}
-/**
- * @param {?} index
- * @param {?} message
- * @return {?}
- */
-function newErrorToken(index, message) {
- return new Token(index, TokenType.Error, 0, message);
-}
-var /** @type {?} */ EOF = new Token(-1, TokenType.Character, 0, '');
-var _Scanner = (function () {
- /**
- * @param {?} input
- */
- function _Scanner(input) {
- this.input = input;
- this.peek = 0;
- this.index = -1;
- this.length = input.length;
- this.advance();
- }
- /**
- * @return {?}
- */
- _Scanner.prototype.advance = function () {
- this.peek = ++this.index >= this.length ? __WEBPACK_IMPORTED_MODULE_0__chars__["m" /* $EOF */] : this.input.charCodeAt(this.index);
- };
- /**
- * @return {?}
- */
- _Scanner.prototype.scanToken = function () {
- var /** @type {?} */ input = this.input, /** @type {?} */ length = this.length;
- var /** @type {?} */ peek = this.peek, /** @type {?} */ index = this.index;
- // Skip whitespace.
- while (peek <= __WEBPACK_IMPORTED_MODULE_0__chars__["n" /* $SPACE */]) {
- if (++index >= length) {
- peek = __WEBPACK_IMPORTED_MODULE_0__chars__["m" /* $EOF */];
- break;
- }
- else {
- peek = input.charCodeAt(index);
- }
- }
- this.peek = peek;
- this.index = index;
- if (index >= length) {
- return null;
- }
- // Handle identifiers and numbers.
- if (isIdentifierStart(peek))
- return this.scanIdentifier();
- if (__WEBPACK_IMPORTED_MODULE_0__chars__["o" /* isDigit */](peek))
- return this.scanNumber(index);
- var /** @type {?} */ start = index;
- switch (peek) {
- case __WEBPACK_IMPORTED_MODULE_0__chars__["e" /* $PERIOD */]:
- this.advance();
- return __WEBPACK_IMPORTED_MODULE_0__chars__["o" /* isDigit */](this.peek) ? this.scanNumber(start) :
- newCharacterToken(start, __WEBPACK_IMPORTED_MODULE_0__chars__["e" /* $PERIOD */]);
- case __WEBPACK_IMPORTED_MODULE_0__chars__["h" /* $LPAREN */]:
- case __WEBPACK_IMPORTED_MODULE_0__chars__["i" /* $RPAREN */]:
- case __WEBPACK_IMPORTED_MODULE_0__chars__["j" /* $LBRACE */]:
- case __WEBPACK_IMPORTED_MODULE_0__chars__["l" /* $RBRACE */]:
- case __WEBPACK_IMPORTED_MODULE_0__chars__["f" /* $LBRACKET */]:
- case __WEBPACK_IMPORTED_MODULE_0__chars__["g" /* $RBRACKET */]:
- case __WEBPACK_IMPORTED_MODULE_0__chars__["k" /* $COMMA */]:
- case __WEBPACK_IMPORTED_MODULE_0__chars__["d" /* $COLON */]:
- case __WEBPACK_IMPORTED_MODULE_0__chars__["c" /* $SEMICOLON */]:
- return this.scanCharacter(start, peek);
- case __WEBPACK_IMPORTED_MODULE_0__chars__["p" /* $SQ */]:
- case __WEBPACK_IMPORTED_MODULE_0__chars__["q" /* $DQ */]:
- return this.scanString();
- case __WEBPACK_IMPORTED_MODULE_0__chars__["r" /* $HASH */]:
- case __WEBPACK_IMPORTED_MODULE_0__chars__["s" /* $PLUS */]:
- case __WEBPACK_IMPORTED_MODULE_0__chars__["t" /* $MINUS */]:
- case __WEBPACK_IMPORTED_MODULE_0__chars__["u" /* $STAR */]:
- case __WEBPACK_IMPORTED_MODULE_0__chars__["b" /* $SLASH */]:
- case __WEBPACK_IMPORTED_MODULE_0__chars__["v" /* $PERCENT */]:
- case __WEBPACK_IMPORTED_MODULE_0__chars__["w" /* $CARET */]:
- return this.scanOperator(start, String.fromCharCode(peek));
- case __WEBPACK_IMPORTED_MODULE_0__chars__["x" /* $QUESTION */]:
- return this.scanComplexOperator(start, '?', __WEBPACK_IMPORTED_MODULE_0__chars__["e" /* $PERIOD */], '.');
- case __WEBPACK_IMPORTED_MODULE_0__chars__["y" /* $LT */]:
- case __WEBPACK_IMPORTED_MODULE_0__chars__["z" /* $GT */]:
- return this.scanComplexOperator(start, String.fromCharCode(peek), __WEBPACK_IMPORTED_MODULE_0__chars__["A" /* $EQ */], '=');
- case __WEBPACK_IMPORTED_MODULE_0__chars__["B" /* $BANG */]:
- case __WEBPACK_IMPORTED_MODULE_0__chars__["A" /* $EQ */]:
- return this.scanComplexOperator(start, String.fromCharCode(peek), __WEBPACK_IMPORTED_MODULE_0__chars__["A" /* $EQ */], '=', __WEBPACK_IMPORTED_MODULE_0__chars__["A" /* $EQ */], '=');
- case __WEBPACK_IMPORTED_MODULE_0__chars__["C" /* $AMPERSAND */]:
- return this.scanComplexOperator(start, '&', __WEBPACK_IMPORTED_MODULE_0__chars__["C" /* $AMPERSAND */], '&');
- case __WEBPACK_IMPORTED_MODULE_0__chars__["D" /* $BAR */]:
- return this.scanComplexOperator(start, '|', __WEBPACK_IMPORTED_MODULE_0__chars__["D" /* $BAR */], '|');
- case __WEBPACK_IMPORTED_MODULE_0__chars__["E" /* $NBSP */]:
- while (__WEBPACK_IMPORTED_MODULE_0__chars__["F" /* isWhitespace */](this.peek))
- this.advance();
- return this.scanToken();
- }
- this.advance();
- return this.error("Unexpected character [" + String.fromCharCode(peek) + "]", 0);
- };
- /**
- * @param {?} start
- * @param {?} code
- * @return {?}
- */
- _Scanner.prototype.scanCharacter = function (start, code) {
- this.advance();
- return newCharacterToken(start, code);
- };
- /**
- * @param {?} start
- * @param {?} str
- * @return {?}
- */
- _Scanner.prototype.scanOperator = function (start, str) {
- this.advance();
- return newOperatorToken(start, str);
- };
- /**
- * Tokenize a 2/3 char long operator
- *
- * @param {?} start start index in the expression
- * @param {?} one first symbol (always part of the operator)
- * @param {?} twoCode code point for the second symbol
- * @param {?} two second symbol (part of the operator when the second code point matches)
- * @param {?=} threeCode code point for the third symbol
- * @param {?=} three third symbol (part of the operator when provided and matches source expression)
- * @return {?}
- */
- _Scanner.prototype.scanComplexOperator = function (start, one, twoCode, two, threeCode, three) {
- this.advance();
- var /** @type {?} */ str = one;
- if (this.peek == twoCode) {
- this.advance();
- str += two;
- }
- if (threeCode != null && this.peek == threeCode) {
- this.advance();
- str += three;
- }
- return newOperatorToken(start, str);
- };
- /**
- * @return {?}
- */
- _Scanner.prototype.scanIdentifier = function () {
- var /** @type {?} */ start = this.index;
- this.advance();
- while (isIdentifierPart(this.peek))
- this.advance();
- var /** @type {?} */ str = this.input.substring(start, this.index);
- return KEYWORDS.indexOf(str) > -1 ? newKeywordToken(start, str) :
- newIdentifierToken(start, str);
- };
- /**
- * @param {?} start
- * @return {?}
- */
- _Scanner.prototype.scanNumber = function (start) {
- var /** @type {?} */ simple = (this.index === start);
- this.advance(); // Skip initial digit.
- while (true) {
- if (__WEBPACK_IMPORTED_MODULE_0__chars__["o" /* isDigit */](this.peek)) {
- }
- else if (this.peek == __WEBPACK_IMPORTED_MODULE_0__chars__["e" /* $PERIOD */]) {
- simple = false;
- }
- else if (isExponentStart(this.peek)) {
- this.advance();
- if (isExponentSign(this.peek))
- this.advance();
- if (!__WEBPACK_IMPORTED_MODULE_0__chars__["o" /* isDigit */](this.peek))
- return this.error('Invalid exponent', -1);
- simple = false;
- }
- else {
- break;
- }
- this.advance();
- }
- var /** @type {?} */ str = this.input.substring(start, this.index);
- var /** @type {?} */ value = simple ? __WEBPACK_IMPORTED_MODULE_1__facade_lang__["i" /* NumberWrapper */].parseIntAutoRadix(str) : parseFloat(str);
- return newNumberToken(start, value);
- };
- /**
- * @return {?}
- */
- _Scanner.prototype.scanString = function () {
- var /** @type {?} */ start = this.index;
- var /** @type {?} */ quote = this.peek;
- this.advance(); // Skip initial quote.
- var /** @type {?} */ buffer = '';
- var /** @type {?} */ marker = this.index;
- var /** @type {?} */ input = this.input;
- while (this.peek != quote) {
- if (this.peek == __WEBPACK_IMPORTED_MODULE_0__chars__["G" /* $BACKSLASH */]) {
- buffer += input.substring(marker, this.index);
- this.advance();
- var /** @type {?} */ unescapedCode = void 0;
- if (this.peek == __WEBPACK_IMPORTED_MODULE_0__chars__["H" /* $u */]) {
- // 4 character hex code for unicode character.
- var /** @type {?} */ hex = input.substring(this.index + 1, this.index + 5);
- if (/^[0-9a-f]+$/i.test(hex)) {
- unescapedCode = parseInt(hex, 16);
- }
- else {
- return this.error("Invalid unicode escape [\\u" + hex + "]", 0);
- }
- for (var /** @type {?} */ i = 0; i < 5; i++) {
- this.advance();
- }
- }
- else {
- unescapedCode = unescape(this.peek);
- this.advance();
- }
- buffer += String.fromCharCode(unescapedCode);
- marker = this.index;
- }
- else if (this.peek == __WEBPACK_IMPORTED_MODULE_0__chars__["m" /* $EOF */]) {
- return this.error('Unterminated quote', 0);
- }
- else {
- this.advance();
- }
- }
- var /** @type {?} */ last = input.substring(marker, this.index);
- this.advance(); // Skip terminating quote.
- return newStringToken(start, buffer + last);
- };
- /**
- * @param {?} message
- * @param {?} offset
- * @return {?}
- */
- _Scanner.prototype.error = function (message, offset) {
- var /** @type {?} */ position = this.index + offset;
- return newErrorToken(position, "Lexer Error: " + message + " at column " + position + " in expression [" + this.input + "]");
- };
- return _Scanner;
-}());
-function _Scanner_tsickle_Closure_declarations() {
- /** @type {?} */
- _Scanner.prototype.length;
- /** @type {?} */
- _Scanner.prototype.peek;
- /** @type {?} */
- _Scanner.prototype.index;
- /** @type {?} */
- _Scanner.prototype.input;
-}
-/**
- * @param {?} code
- * @return {?}
- */
-function isIdentifierStart(code) {
- return (__WEBPACK_IMPORTED_MODULE_0__chars__["I" /* $a */] <= code && code <= __WEBPACK_IMPORTED_MODULE_0__chars__["J" /* $z */]) || (__WEBPACK_IMPORTED_MODULE_0__chars__["K" /* $A */] <= code && code <= __WEBPACK_IMPORTED_MODULE_0__chars__["L" /* $Z */]) ||
- (code == __WEBPACK_IMPORTED_MODULE_0__chars__["M" /* $_ */]) || (code == __WEBPACK_IMPORTED_MODULE_0__chars__["N" /* $$ */]);
-}
-/**
- * @param {?} input
- * @return {?}
- */
-function isIdentifier(input) {
- if (input.length == 0)
- return false;
- var /** @type {?} */ scanner = new _Scanner(input);
- if (!isIdentifierStart(scanner.peek))
- return false;
- scanner.advance();
- while (scanner.peek !== __WEBPACK_IMPORTED_MODULE_0__chars__["m" /* $EOF */]) {
- if (!isIdentifierPart(scanner.peek))
- return false;
- scanner.advance();
- }
- return true;
-}
-/**
- * @param {?} code
- * @return {?}
- */
-function isIdentifierPart(code) {
- return __WEBPACK_IMPORTED_MODULE_0__chars__["O" /* isAsciiLetter */](code) || __WEBPACK_IMPORTED_MODULE_0__chars__["o" /* isDigit */](code) || (code == __WEBPACK_IMPORTED_MODULE_0__chars__["M" /* $_ */]) ||
- (code == __WEBPACK_IMPORTED_MODULE_0__chars__["N" /* $$ */]);
-}
-/**
- * @param {?} code
- * @return {?}
- */
-function isExponentStart(code) {
- return code == __WEBPACK_IMPORTED_MODULE_0__chars__["P" /* $e */] || code == __WEBPACK_IMPORTED_MODULE_0__chars__["Q" /* $E */];
-}
-/**
- * @param {?} code
- * @return {?}
- */
-function isExponentSign(code) {
- return code == __WEBPACK_IMPORTED_MODULE_0__chars__["t" /* $MINUS */] || code == __WEBPACK_IMPORTED_MODULE_0__chars__["s" /* $PLUS */];
-}
-/**
- * @param {?} code
- * @return {?}
- */
-function isQuote(code) {
- return code === __WEBPACK_IMPORTED_MODULE_0__chars__["p" /* $SQ */] || code === __WEBPACK_IMPORTED_MODULE_0__chars__["q" /* $DQ */] || code === __WEBPACK_IMPORTED_MODULE_0__chars__["R" /* $BT */];
-}
-/**
- * @param {?} code
- * @return {?}
- */
-function unescape(code) {
- switch (code) {
- case __WEBPACK_IMPORTED_MODULE_0__chars__["S" /* $n */]:
- return __WEBPACK_IMPORTED_MODULE_0__chars__["a" /* $LF */];
- case __WEBPACK_IMPORTED_MODULE_0__chars__["T" /* $f */]:
- return __WEBPACK_IMPORTED_MODULE_0__chars__["U" /* $FF */];
- case __WEBPACK_IMPORTED_MODULE_0__chars__["V" /* $r */]:
- return __WEBPACK_IMPORTED_MODULE_0__chars__["W" /* $CR */];
- case __WEBPACK_IMPORTED_MODULE_0__chars__["X" /* $t */]:
- return __WEBPACK_IMPORTED_MODULE_0__chars__["Y" /* $TAB */];
- case __WEBPACK_IMPORTED_MODULE_0__chars__["Z" /* $v */]:
- return __WEBPACK_IMPORTED_MODULE_0__chars__["_0" /* $VTAB */];
- default:
- return code;
- }
-}
-//# sourceMappingURL=lexer.js.map
-
-/***/ }),
-/* 116 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__aot_static_symbol__ = __webpack_require__(65);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__assertions__ = __webpack_require__(334);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__compile_metadata__ = __webpack_require__(15);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__directive_normalizer__ = __webpack_require__(113);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__directive_resolver__ = __webpack_require__(114);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__facade_lang__ = __webpack_require__(6);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__identifiers__ = __webpack_require__(19);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__injectable__ = __webpack_require__(20);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__lifecycle_reflector__ = __webpack_require__(557);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__ng_module_resolver__ = __webpack_require__(117);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__pipe_resolver__ = __webpack_require__(118);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__private_import_core__ = __webpack_require__(17);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__schema_element_schema_registry__ = __webpack_require__(69);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__summary_resolver__ = __webpack_require__(233);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__url_resolver__ = __webpack_require__(81);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__util__ = __webpack_require__(32);
-/* unused harmony export ERROR_COLLECTOR_TOKEN */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CompileMetadataResolver; });
-/* unused harmony export componentModuleUrl */
-/**
- * @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 = (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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-var __metadata = (this && this.__metadata) || function (k, v) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-var /** @type {?} */ ERROR_COLLECTOR_TOKEN = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["H" /* OpaqueToken */]('ErrorCollector');
-var CompileMetadataResolver = (function () {
- /**
- * @param {?} _ngModuleResolver
- * @param {?} _directiveResolver
- * @param {?} _pipeResolver
- * @param {?} _summaryResolver
- * @param {?} _schemaRegistry
- * @param {?} _directiveNormalizer
- * @param {?=} _reflector
- * @param {?=} _errorCollector
- */
- function CompileMetadataResolver(_ngModuleResolver, _directiveResolver, _pipeResolver, _summaryResolver, _schemaRegistry, _directiveNormalizer, _reflector, _errorCollector) {
- if (_reflector === void 0) { _reflector = __WEBPACK_IMPORTED_MODULE_12__private_import_core__["c" /* reflector */]; }
- this._ngModuleResolver = _ngModuleResolver;
- this._directiveResolver = _directiveResolver;
- this._pipeResolver = _pipeResolver;
- this._summaryResolver = _summaryResolver;
- this._schemaRegistry = _schemaRegistry;
- this._directiveNormalizer = _directiveNormalizer;
- this._reflector = _reflector;
- this._errorCollector = _errorCollector;
- this._directiveCache = new Map();
- this._summaryCache = new Map();
- this._pipeCache = new Map();
- this._ngModuleCache = new Map();
- this._ngModuleOfTypes = new Map();
- }
- /**
- * @param {?} type
- * @return {?}
- */
- CompileMetadataResolver.prototype.clearCacheFor = function (type) {
- var /** @type {?} */ dirMeta = this._directiveCache.get(type);
- this._directiveCache.delete(type);
- this._summaryCache.delete(type);
- this._pipeCache.delete(type);
- this._ngModuleOfTypes.delete(type);
- // Clear all of the NgModule as they contain transitive information!
- this._ngModuleCache.clear();
- if (dirMeta) {
- this._directiveNormalizer.clearCacheFor(dirMeta);
- }
- };
- /**
- * @return {?}
- */
- CompileMetadataResolver.prototype.clearCache = function () {
- this._directiveCache.clear();
- this._summaryCache.clear();
- this._pipeCache.clear();
- this._ngModuleCache.clear();
- this._ngModuleOfTypes.clear();
- this._directiveNormalizer.clearCache();
- };
- /**
- * @param {?} entry
- * @return {?}
- */
- CompileMetadataResolver.prototype.getAnimationEntryMetadata = function (entry) {
- var _this = this;
- var /** @type {?} */ defs = entry.definitions.map(function (def) { return _this._getAnimationStateMetadata(def); });
- return new __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["m" /* CompileAnimationEntryMetadata */](entry.name, defs);
- };
- /**
- * @param {?} value
- * @return {?}
- */
- CompileMetadataResolver.prototype._getAnimationStateMetadata = function (value) {
- if (value instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["_4" /* AnimationStateDeclarationMetadata */]) {
- var /** @type {?} */ styles = this._getAnimationStyleMetadata(value.styles);
- return new __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["b" /* CompileAnimationStateDeclarationMetadata */](value.stateNameExpr, styles);
- }
- if (value instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["_5" /* AnimationStateTransitionMetadata */]) {
- return new __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["n" /* CompileAnimationStateTransitionMetadata */](value.stateChangeExpr, this._getAnimationMetadata(value.steps));
- }
- return null;
- };
- /**
- * @param {?} value
- * @return {?}
- */
- CompileMetadataResolver.prototype._getAnimationStyleMetadata = function (value) {
- return new __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["f" /* CompileAnimationStyleMetadata */](value.offset, value.styles);
- };
- /**
- * @param {?} value
- * @return {?}
- */
- CompileMetadataResolver.prototype._getAnimationMetadata = function (value) {
- var _this = this;
- if (value instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["_6" /* AnimationStyleMetadata */]) {
- return this._getAnimationStyleMetadata(value);
- }
- if (value instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["_7" /* AnimationKeyframesSequenceMetadata */]) {
- return new __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["h" /* CompileAnimationKeyframesSequenceMetadata */](value.steps.map(function (entry) { return _this._getAnimationStyleMetadata(entry); }));
- }
- if (value instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["_8" /* AnimationAnimateMetadata */]) {
- var /** @type {?} */ animateData = (this
- ._getAnimationMetadata(value.styles));
- return new __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["g" /* CompileAnimationAnimateMetadata */](value.timings, animateData);
- }
- if (value instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["_9" /* AnimationWithStepsMetadata */]) {
- var /** @type {?} */ steps = value.steps.map(function (step) { return _this._getAnimationMetadata(step); });
- if (value instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* AnimationGroupMetadata */]) {
- return new __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["d" /* CompileAnimationGroupMetadata */](steps);
- }
- return new __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["c" /* CompileAnimationSequenceMetadata */](steps);
- }
- return null;
- };
- /**
- * @param {?} type
- * @param {?} kind
- * @return {?}
- */
- CompileMetadataResolver.prototype._loadSummary = function (type, kind) {
- var /** @type {?} */ typeSummary = this._summaryCache.get(type);
- if (!typeSummary) {
- var /** @type {?} */ summary = this._summaryResolver.resolveSummary(type);
- typeSummary = summary ? summary.type : null;
- this._summaryCache.set(type, typeSummary);
- }
- return typeSummary && typeSummary.summaryKind === kind ? typeSummary : null;
- };
- /**
- * @param {?} directiveType
- * @param {?} isSync
- * @return {?}
- */
- CompileMetadataResolver.prototype._loadDirectiveMetadata = function (directiveType, isSync) {
- var _this = this;
- if (this._directiveCache.has(directiveType)) {
- return;
- }
- directiveType = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_11" /* resolveForwardRef */])(directiveType);
- var _a = this.getNonNormalizedDirectiveMetadata(directiveType), annotation = _a.annotation, metadata = _a.metadata;
- var /** @type {?} */ createDirectiveMetadata = function (templateMetadata) {
- var /** @type {?} */ normalizedDirMeta = new __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["o" /* CompileDirectiveMetadata */]({
- type: metadata.type,
- isComponent: metadata.isComponent,
- selector: metadata.selector,
- exportAs: metadata.exportAs,
- changeDetection: metadata.changeDetection,
- inputs: metadata.inputs,
- outputs: metadata.outputs,
- hostListeners: metadata.hostListeners,
- hostProperties: metadata.hostProperties,
- hostAttributes: metadata.hostAttributes,
- providers: metadata.providers,
- viewProviders: metadata.viewProviders,
- queries: metadata.queries,
- viewQueries: metadata.viewQueries,
- entryComponents: metadata.entryComponents,
- template: templateMetadata
- });
- _this._directiveCache.set(directiveType, normalizedDirMeta);
- _this._summaryCache.set(directiveType, normalizedDirMeta.toSummary());
- return normalizedDirMeta;
- };
- if (metadata.isComponent) {
- var /** @type {?} */ templateMeta = this._directiveNormalizer.normalizeTemplate({
- componentType: directiveType,
- moduleUrl: componentModuleUrl(this._reflector, directiveType, annotation),
- encapsulation: metadata.template.encapsulation,
- template: metadata.template.template,
- templateUrl: metadata.template.templateUrl,
- styles: metadata.template.styles,
- styleUrls: metadata.template.styleUrls,
- animations: metadata.template.animations,
- interpolation: metadata.template.interpolation
- });
- if (templateMeta.syncResult) {
- createDirectiveMetadata(templateMeta.syncResult);
- return null;
- }
- else {
- if (isSync) {
- this._reportError(new __WEBPACK_IMPORTED_MODULE_12__private_import_core__["I" /* ComponentStillLoadingError */](directiveType), directiveType);
- return null;
- }
- return templateMeta.asyncResult.then(createDirectiveMetadata);
- }
- }
- else {
- // directive
- createDirectiveMetadata(null);
- return null;
- }
- };
- /**
- * @param {?} directiveType
- * @return {?}
- */
- CompileMetadataResolver.prototype.getNonNormalizedDirectiveMetadata = function (directiveType) {
- var _this = this;
- directiveType = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_11" /* resolveForwardRef */])(directiveType);
- var /** @type {?} */ dirMeta = this._directiveResolver.resolve(directiveType);
- if (!dirMeta) {
- return null;
- }
- var /** @type {?} */ nonNormalizedTemplateMetadata;
- if (dirMeta instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* Component */]) {
- // component
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__assertions__["b" /* assertArrayOfStrings */])('styles', dirMeta.styles);
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__assertions__["b" /* assertArrayOfStrings */])('styleUrls', dirMeta.styleUrls);
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__assertions__["a" /* assertInterpolationSymbols */])('interpolation', dirMeta.interpolation);
- var /** @type {?} */ animations = dirMeta.animations ?
- dirMeta.animations.map(function (e) { return _this.getAnimationEntryMetadata(e); }) :
- null;
- nonNormalizedTemplateMetadata = new __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["p" /* CompileTemplateMetadata */]({
- encapsulation: dirMeta.encapsulation,
- template: dirMeta.template,
- templateUrl: dirMeta.templateUrl,
- styles: dirMeta.styles,
- styleUrls: dirMeta.styleUrls,
- animations: animations,
- interpolation: dirMeta.interpolation
- });
- }
- var /** @type {?} */ changeDetectionStrategy = null;
- var /** @type {?} */ viewProviders = [];
- var /** @type {?} */ entryComponentMetadata = [];
- var /** @type {?} */ selector = dirMeta.selector;
- if (dirMeta instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* Component */]) {
- // Component
- changeDetectionStrategy = dirMeta.changeDetection;
- if (dirMeta.viewProviders) {
- viewProviders = this._getProvidersMetadata(dirMeta.viewProviders, entryComponentMetadata, "viewProviders for \"" + stringifyType(directiveType) + "\"", [], directiveType);
- }
- if (dirMeta.entryComponents) {
- entryComponentMetadata = flattenAndDedupeArray(dirMeta.entryComponents)
- .map(function (type) { return _this._getIdentifierMetadata(type); })
- .concat(entryComponentMetadata);
- }
- if (!selector) {
- selector = this._schemaRegistry.getDefaultComponentElementName();
- }
- }
- else {
- // Directive
- if (!selector) {
- this._reportError(new __WEBPACK_IMPORTED_MODULE_16__util__["e" /* SyntaxError */]("Directive " + stringifyType(directiveType) + " has no selector, please add it!"), directiveType);
- selector = 'error';
- }
- }
- var /** @type {?} */ providers = [];
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__facade_lang__["c" /* isPresent */])(dirMeta.providers)) {
- providers = this._getProvidersMetadata(dirMeta.providers, entryComponentMetadata, "providers for \"" + stringifyType(directiveType) + "\"", [], directiveType);
- }
- var /** @type {?} */ queries = [];
- var /** @type {?} */ viewQueries = [];
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__facade_lang__["c" /* isPresent */])(dirMeta.queries)) {
- queries = this._getQueriesMetadata(dirMeta.queries, false, directiveType);
- viewQueries = this._getQueriesMetadata(dirMeta.queries, true, directiveType);
- }
- var /** @type {?} */ metadata = __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["o" /* CompileDirectiveMetadata */].create({
- selector: selector,
- exportAs: dirMeta.exportAs,
- isComponent: !!nonNormalizedTemplateMetadata,
- type: this._getTypeMetadata(directiveType),
- template: nonNormalizedTemplateMetadata,
- changeDetection: changeDetectionStrategy,
- inputs: dirMeta.inputs,
- outputs: dirMeta.outputs,
- host: dirMeta.host,
- providers: providers,
- viewProviders: viewProviders,
- queries: queries,
- viewQueries: viewQueries,
- entryComponents: entryComponentMetadata
- });
- return { metadata: metadata, annotation: dirMeta };
- };
- /**
- * Gets the metadata for the given directive.
- * This assumes `loadNgModuleDirectiveAndPipeMetadata` has been called first.
- * @param {?} directiveType
- * @return {?}
- */
- CompileMetadataResolver.prototype.getDirectiveMetadata = function (directiveType) {
- var /** @type {?} */ dirMeta = this._directiveCache.get(directiveType);
- if (!dirMeta) {
- this._reportError(new __WEBPACK_IMPORTED_MODULE_16__util__["e" /* SyntaxError */]("Illegal state: getDirectiveMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Directive " + stringifyType(directiveType) + "."), directiveType);
- }
- return dirMeta;
- };
- /**
- * @param {?} dirType
- * @return {?}
- */
- CompileMetadataResolver.prototype.getDirectiveSummary = function (dirType) {
- var /** @type {?} */ dirSummary = (this._loadSummary(dirType, __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["q" /* CompileSummaryKind */].Directive));
- if (!dirSummary) {
- this._reportError(new __WEBPACK_IMPORTED_MODULE_16__util__["e" /* SyntaxError */]("Illegal state: Could not load the summary for directive " + stringifyType(dirType) + "."), dirType);
- }
- return dirSummary;
- };
- /**
- * @param {?} type
- * @return {?}
- */
- CompileMetadataResolver.prototype.isDirective = function (type) { return this._directiveResolver.isDirective(type); };
- /**
- * @param {?} type
- * @return {?}
- */
- CompileMetadataResolver.prototype.isPipe = function (type) { return this._pipeResolver.isPipe(type); };
- /**
- * @param {?} moduleType
- * @return {?}
- */
- CompileMetadataResolver.prototype.getNgModuleSummary = function (moduleType) {
- var /** @type {?} */ moduleSummary = (this._loadSummary(moduleType, __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["q" /* CompileSummaryKind */].NgModule));
- if (!moduleSummary) {
- var /** @type {?} */ moduleMeta = this.getNgModuleMetadata(moduleType, false);
- moduleSummary = moduleMeta ? moduleMeta.toSummary() : null;
- if (moduleSummary) {
- this._summaryCache.set(moduleType, moduleSummary);
- }
- }
- return moduleSummary;
- };
- /**
- * Loads the declared directives and pipes of an NgModule.
- * @param {?} moduleType
- * @param {?} isSync
- * @param {?=} throwIfNotFound
- * @return {?}
- */
- CompileMetadataResolver.prototype.loadNgModuleDirectiveAndPipeMetadata = function (moduleType, isSync, throwIfNotFound) {
- var _this = this;
- if (throwIfNotFound === void 0) { throwIfNotFound = true; }
- var /** @type {?} */ ngModule = this.getNgModuleMetadata(moduleType, throwIfNotFound);
- var /** @type {?} */ loading = [];
- if (ngModule) {
- ngModule.declaredDirectives.forEach(function (id) {
- var /** @type {?} */ promise = _this._loadDirectiveMetadata(id.reference, isSync);
- if (promise) {
- loading.push(promise);
- }
- });
- ngModule.declaredPipes.forEach(function (id) { return _this._loadPipeMetadata(id.reference); });
- }
- return Promise.all(loading);
- };
- /**
- * @param {?} moduleType
- * @param {?=} throwIfNotFound
- * @return {?}
- */
- CompileMetadataResolver.prototype.getNgModuleMetadata = function (moduleType, throwIfNotFound) {
- var _this = this;
- if (throwIfNotFound === void 0) { throwIfNotFound = true; }
- moduleType = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_11" /* resolveForwardRef */])(moduleType);
- var /** @type {?} */ compileMeta = this._ngModuleCache.get(moduleType);
- if (compileMeta) {
- return compileMeta;
- }
- var /** @type {?} */ meta = this._ngModuleResolver.resolve(moduleType, throwIfNotFound);
- if (!meta) {
- return null;
- }
- var /** @type {?} */ declaredDirectives = [];
- var /** @type {?} */ exportedNonModuleIdentifiers = [];
- var /** @type {?} */ declaredPipes = [];
- var /** @type {?} */ importedModules = [];
- var /** @type {?} */ exportedModules = [];
- var /** @type {?} */ providers = [];
- var /** @type {?} */ entryComponents = [];
- var /** @type {?} */ bootstrapComponents = [];
- var /** @type {?} */ schemas = [];
- if (meta.imports) {
- flattenAndDedupeArray(meta.imports).forEach(function (importedType) {
- var /** @type {?} */ importedModuleType;
- if (isValidType(importedType)) {
- importedModuleType = importedType;
- }
- else if (importedType && importedType.ngModule) {
- var /** @type {?} */ moduleWithProviders = importedType;
- importedModuleType = moduleWithProviders.ngModule;
- if (moduleWithProviders.providers) {
- providers.push.apply(providers, _this._getProvidersMetadata(moduleWithProviders.providers, entryComponents, "provider for the NgModule '" + stringifyType(importedModuleType) + "'", [], importedType));
- }
- }
- if (importedModuleType) {
- var /** @type {?} */ importedModuleSummary = _this.getNgModuleSummary(importedModuleType);
- if (!importedModuleSummary) {
- _this._reportError(new __WEBPACK_IMPORTED_MODULE_16__util__["e" /* SyntaxError */]("Unexpected " + _this._getTypeDescriptor(importedType) + " '" + stringifyType(importedType) + "' imported by the module '" + stringifyType(moduleType) + "'"), moduleType);
- return;
- }
- importedModules.push(importedModuleSummary);
- }
- else {
- _this._reportError(new __WEBPACK_IMPORTED_MODULE_16__util__["e" /* SyntaxError */]("Unexpected value '" + stringifyType(importedType) + "' imported by the module '" + stringifyType(moduleType) + "'"), moduleType);
- return;
- }
- });
- }
- if (meta.exports) {
- flattenAndDedupeArray(meta.exports).forEach(function (exportedType) {
- if (!isValidType(exportedType)) {
- _this._reportError(new __WEBPACK_IMPORTED_MODULE_16__util__["e" /* SyntaxError */]("Unexpected value '" + stringifyType(exportedType) + "' exported by the module '" + stringifyType(moduleType) + "'"), moduleType);
- return;
- }
- var /** @type {?} */ exportedModuleSummary = _this.getNgModuleSummary(exportedType);
- if (exportedModuleSummary) {
- exportedModules.push(exportedModuleSummary);
- }
- else {
- exportedNonModuleIdentifiers.push(_this._getIdentifierMetadata(exportedType));
- }
- });
- }
- // Note: This will be modified later, so we rely on
- // getting a new instance every time!
- var /** @type {?} */ transitiveModule = this._getTransitiveNgModuleMetadata(importedModules, exportedModules);
- if (meta.declarations) {
- flattenAndDedupeArray(meta.declarations).forEach(function (declaredType) {
- if (!isValidType(declaredType)) {
- _this._reportError(new __WEBPACK_IMPORTED_MODULE_16__util__["e" /* SyntaxError */]("Unexpected value '" + stringifyType(declaredType) + "' declared by the module '" + stringifyType(moduleType) + "'"), moduleType);
- return;
- }
- var /** @type {?} */ declaredIdentifier = _this._getIdentifierMetadata(declaredType);
- if (_this._directiveResolver.isDirective(declaredType)) {
- transitiveModule.addDirective(declaredIdentifier);
- declaredDirectives.push(declaredIdentifier);
- _this._addTypeToModule(declaredType, moduleType);
- }
- else if (_this._pipeResolver.isPipe(declaredType)) {
- transitiveModule.addPipe(declaredIdentifier);
- transitiveModule.pipes.push(declaredIdentifier);
- declaredPipes.push(declaredIdentifier);
- _this._addTypeToModule(declaredType, moduleType);
- }
- else {
- _this._reportError(new __WEBPACK_IMPORTED_MODULE_16__util__["e" /* SyntaxError */]("Unexpected " + _this._getTypeDescriptor(declaredType) + " '" + stringifyType(declaredType) + "' declared by the module '" + stringifyType(moduleType) + "'"), moduleType);
- return;
- }
- });
- }
- var /** @type {?} */ exportedDirectives = [];
- var /** @type {?} */ exportedPipes = [];
- exportedNonModuleIdentifiers.forEach(function (exportedId) {
- if (transitiveModule.directivesSet.has(exportedId.reference)) {
- exportedDirectives.push(exportedId);
- transitiveModule.addExportedDirective(exportedId);
- }
- else if (transitiveModule.pipesSet.has(exportedId.reference)) {
- exportedPipes.push(exportedId);
- transitiveModule.addExportedPipe(exportedId);
- }
- else {
- _this._reportError(new __WEBPACK_IMPORTED_MODULE_16__util__["e" /* SyntaxError */]("Can't export " + _this._getTypeDescriptor(exportedId.reference) + " " + stringifyType(exportedId.reference) + " from " + stringifyType(moduleType) + " as it was neither declared nor imported!"), moduleType);
- }
- });
- // The providers of the module have to go last
- // so that they overwrite any other provider we already added.
- if (meta.providers) {
- providers.push.apply(providers, this._getProvidersMetadata(meta.providers, entryComponents, "provider for the NgModule '" + stringifyType(moduleType) + "'", [], moduleType));
- }
- if (meta.entryComponents) {
- entryComponents.push.apply(entryComponents, flattenAndDedupeArray(meta.entryComponents)
- .map(function (type) { return _this._getIdentifierMetadata(type); }));
- }
- if (meta.bootstrap) {
- flattenAndDedupeArray(meta.bootstrap).forEach(function (type) {
- if (!isValidType(type)) {
- _this._reportError(new __WEBPACK_IMPORTED_MODULE_16__util__["e" /* SyntaxError */]("Unexpected value '" + stringifyType(type) + "' used in the bootstrap property of module '" + stringifyType(moduleType) + "'"), moduleType);
- return;
- }
- bootstrapComponents.push(_this._getIdentifierMetadata(type));
- });
- }
- entryComponents.push.apply(entryComponents, bootstrapComponents);
- if (meta.schemas) {
- schemas.push.apply(schemas, flattenAndDedupeArray(meta.schemas));
- }
- compileMeta = new __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["r" /* CompileNgModuleMetadata */]({
- type: this._getTypeMetadata(moduleType),
- providers: providers,
- entryComponents: entryComponents,
- bootstrapComponents: bootstrapComponents,
- schemas: schemas,
- declaredDirectives: declaredDirectives,
- exportedDirectives: exportedDirectives,
- declaredPipes: declaredPipes,
- exportedPipes: exportedPipes,
- importedModules: importedModules,
- exportedModules: exportedModules,
- transitiveModule: transitiveModule,
- id: meta.id,
- });
- entryComponents.forEach(function (id) { return transitiveModule.addEntryComponent(id); });
- providers.forEach(function (provider) { return transitiveModule.addProvider(provider, compileMeta.type); });
- transitiveModule.addModule(compileMeta.type);
- this._ngModuleCache.set(moduleType, compileMeta);
- return compileMeta;
- };
- /**
- * @param {?} type
- * @return {?}
- */
- CompileMetadataResolver.prototype._getTypeDescriptor = function (type) {
- if (this._directiveResolver.isDirective(type)) {
- return 'directive';
- }
- if (this._pipeResolver.isPipe(type)) {
- return 'pipe';
- }
- if (this._ngModuleResolver.isNgModule(type)) {
- return 'module';
- }
- if (((type)).provide) {
- return 'provider';
- }
- return 'value';
- };
- /**
- * @param {?} type
- * @param {?} moduleType
- * @return {?}
- */
- CompileMetadataResolver.prototype._addTypeToModule = function (type, moduleType) {
- var /** @type {?} */ oldModule = this._ngModuleOfTypes.get(type);
- if (oldModule && oldModule !== moduleType) {
- this._reportError(new __WEBPACK_IMPORTED_MODULE_16__util__["e" /* SyntaxError */](("Type " + stringifyType(type) + " is part of the declarations of 2 modules: " + stringifyType(oldModule) + " and " + stringifyType(moduleType) + "! ") +
- ("Please consider moving " + stringifyType(type) + " to a higher module that imports " + stringifyType(oldModule) + " and " + stringifyType(moduleType) + ". ") +
- ("You can also create a new NgModule that exports and includes " + stringifyType(type) + " then import that NgModule in " + stringifyType(oldModule) + " and " + stringifyType(moduleType) + ".")), moduleType);
- }
- this._ngModuleOfTypes.set(type, moduleType);
- };
- /**
- * @param {?} importedModules
- * @param {?} exportedModules
- * @return {?}
- */
- CompileMetadataResolver.prototype._getTransitiveNgModuleMetadata = function (importedModules, exportedModules) {
- // collect `providers` / `entryComponents` from all imported and all exported modules
- var /** @type {?} */ result = new __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["s" /* TransitiveCompileNgModuleMetadata */]();
- var /** @type {?} */ modulesByToken = new Map();
- importedModules.concat(exportedModules).forEach(function (modSummary) {
- modSummary.modules.forEach(function (mod) { return result.addModule(mod); });
- modSummary.entryComponents.forEach(function (comp) { return result.addEntryComponent(comp); });
- var /** @type {?} */ addedTokens = new Set();
- modSummary.providers.forEach(function (entry) {
- var /** @type {?} */ tokenRef = __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["j" /* tokenReference */](entry.provider.token);
- var /** @type {?} */ prevModules = modulesByToken.get(tokenRef);
- if (!prevModules) {
- prevModules = new Set();
- modulesByToken.set(tokenRef, prevModules);
- }
- var /** @type {?} */ moduleRef = entry.module.reference;
- // Note: the providers of one module may still contain multiple providers
- // per token (e.g. for multi providers), and we need to preserve these.
- if (addedTokens.has(tokenRef) || !prevModules.has(moduleRef)) {
- prevModules.add(moduleRef);
- addedTokens.add(tokenRef);
- result.addProvider(entry.provider, entry.module);
- }
- });
- });
- exportedModules.forEach(function (modSummary) {
- modSummary.exportedDirectives.forEach(function (id) { return result.addExportedDirective(id); });
- modSummary.exportedPipes.forEach(function (id) { return result.addExportedPipe(id); });
- });
- importedModules.forEach(function (modSummary) {
- modSummary.exportedDirectives.forEach(function (id) { return result.addDirective(id); });
- modSummary.exportedPipes.forEach(function (id) { return result.addPipe(id); });
- });
- return result;
- };
- /**
- * @param {?} type
- * @return {?}
- */
- CompileMetadataResolver.prototype._getIdentifierMetadata = function (type) {
- type = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_11" /* resolveForwardRef */])(type);
- return { reference: type };
- };
- /**
- * @param {?} type
- * @return {?}
- */
- CompileMetadataResolver.prototype.isInjectable = function (type) {
- var /** @type {?} */ annotations = this._reflector.annotations(type);
- // Note: We need an exact check here as @Component / @Directive / ... inherit
- // from @CompilerInjectable!
- return annotations.some(function (ann) { return ann.constructor === __WEBPACK_IMPORTED_MODULE_0__angular_core__["d" /* Injectable */]; });
- };
- /**
- * @param {?} type
- * @return {?}
- */
- CompileMetadataResolver.prototype.getInjectableSummary = function (type) {
- return { summaryKind: __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["q" /* CompileSummaryKind */].Injectable, type: this._getTypeMetadata(type) };
- };
- /**
- * @param {?} type
- * @param {?=} dependencies
- * @return {?}
- */
- CompileMetadataResolver.prototype._getInjectableMetadata = function (type, dependencies) {
- if (dependencies === void 0) { dependencies = null; }
- var /** @type {?} */ typeSummary = this._loadSummary(type, __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["q" /* CompileSummaryKind */].Injectable);
- if (typeSummary) {
- return typeSummary.type;
- }
- return this._getTypeMetadata(type, dependencies);
- };
- /**
- * @param {?} type
- * @param {?=} dependencies
- * @return {?}
- */
- CompileMetadataResolver.prototype._getTypeMetadata = function (type, dependencies) {
- if (dependencies === void 0) { dependencies = null; }
- var /** @type {?} */ identifier = this._getIdentifierMetadata(type);
- return {
- reference: identifier.reference,
- diDeps: this._getDependenciesMetadata(identifier.reference, dependencies),
- lifecycleHooks: __WEBPACK_IMPORTED_MODULE_12__private_import_core__["J" /* LIFECYCLE_HOOKS_VALUES */].filter(function (hook) { return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__lifecycle_reflector__["a" /* hasLifecycleHook */])(hook, identifier.reference); }),
- };
- };
- /**
- * @param {?} factory
- * @param {?=} dependencies
- * @return {?}
- */
- CompileMetadataResolver.prototype._getFactoryMetadata = function (factory, dependencies) {
- if (dependencies === void 0) { dependencies = null; }
- factory = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_11" /* resolveForwardRef */])(factory);
- return { reference: factory, diDeps: this._getDependenciesMetadata(factory, dependencies) };
- };
- /**
- * Gets the metadata for the given pipe.
- * This assumes `loadNgModuleDirectiveAndPipeMetadata` has been called first.
- * @param {?} pipeType
- * @return {?}
- */
- CompileMetadataResolver.prototype.getPipeMetadata = function (pipeType) {
- var /** @type {?} */ pipeMeta = this._pipeCache.get(pipeType);
- if (!pipeMeta) {
- this._reportError(new __WEBPACK_IMPORTED_MODULE_16__util__["e" /* SyntaxError */]("Illegal state: getPipeMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Pipe " + stringifyType(pipeType) + "."), pipeType);
- }
- return pipeMeta;
- };
- /**
- * @param {?} pipeType
- * @return {?}
- */
- CompileMetadataResolver.prototype.getPipeSummary = function (pipeType) {
- var /** @type {?} */ pipeSummary = (this._loadSummary(pipeType, __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["q" /* CompileSummaryKind */].Pipe));
- if (!pipeSummary) {
- this._reportError(new __WEBPACK_IMPORTED_MODULE_16__util__["e" /* SyntaxError */]("Illegal state: Could not load the summary for pipe " + stringifyType(pipeType) + "."), pipeType);
- }
- return pipeSummary;
- };
- /**
- * @param {?} pipeType
- * @return {?}
- */
- CompileMetadataResolver.prototype.getOrLoadPipeMetadata = function (pipeType) {
- var /** @type {?} */ pipeMeta = this._pipeCache.get(pipeType);
- if (!pipeMeta) {
- pipeMeta = this._loadPipeMetadata(pipeType);
- }
- return pipeMeta;
- };
- /**
- * @param {?} pipeType
- * @return {?}
- */
- CompileMetadataResolver.prototype._loadPipeMetadata = function (pipeType) {
- pipeType = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_11" /* resolveForwardRef */])(pipeType);
- var /** @type {?} */ pipeAnnotation = this._pipeResolver.resolve(pipeType);
- var /** @type {?} */ pipeMeta = new __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["t" /* CompilePipeMetadata */]({
- type: this._getTypeMetadata(pipeType),
- name: pipeAnnotation.name,
- pure: pipeAnnotation.pure
- });
- this._pipeCache.set(pipeType, pipeMeta);
- this._summaryCache.set(pipeType, pipeMeta.toSummary());
- return pipeMeta;
- };
- /**
- * @param {?} typeOrFunc
- * @param {?} dependencies
- * @return {?}
- */
- CompileMetadataResolver.prototype._getDependenciesMetadata = function (typeOrFunc, dependencies) {
- var _this = this;
- var /** @type {?} */ hasUnknownDeps = false;
- var /** @type {?} */ params = dependencies || this._reflector.parameters(typeOrFunc) || [];
- var /** @type {?} */ dependenciesMetadata = params.map(function (param) {
- var /** @type {?} */ isAttribute = false;
- var /** @type {?} */ isHost = false;
- var /** @type {?} */ isSelf = false;
- var /** @type {?} */ isSkipSelf = false;
- var /** @type {?} */ isOptional = false;
- var /** @type {?} */ token = null;
- if (Array.isArray(param)) {
- param.forEach(function (paramEntry) {
- if (paramEntry instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["A" /* Host */]) {
- isHost = true;
- }
- else if (paramEntry instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["_13" /* Self */]) {
- isSelf = true;
- }
- else if (paramEntry instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["o" /* SkipSelf */]) {
- isSkipSelf = true;
- }
- else if (paramEntry instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Optional */]) {
- isOptional = true;
- }
- else if (paramEntry instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["x" /* Attribute */]) {
- isAttribute = true;
- token = paramEntry.attributeName;
- }
- else if (paramEntry instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["q" /* Inject */]) {
- token = paramEntry.token;
- }
- else if (isValidType(paramEntry) && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__facade_lang__["d" /* isBlank */])(token)) {
- token = paramEntry;
- }
- });
- }
- else {
- token = param;
- }
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__facade_lang__["d" /* isBlank */])(token)) {
- hasUnknownDeps = true;
- return null;
- }
- return {
- isAttribute: isAttribute,
- isHost: isHost,
- isSelf: isSelf,
- isSkipSelf: isSkipSelf,
- isOptional: isOptional,
- token: _this._getTokenMetadata(token)
- };
- });
- if (hasUnknownDeps) {
- var /** @type {?} */ depsTokens = dependenciesMetadata.map(function (dep) { return dep ? stringifyType(dep.token) : '?'; }).join(', ');
- this._reportError(new __WEBPACK_IMPORTED_MODULE_16__util__["e" /* SyntaxError */]("Can't resolve all parameters for " + stringifyType(typeOrFunc) + ": (" + depsTokens + ")."), typeOrFunc);
- }
- return dependenciesMetadata;
- };
- /**
- * @param {?} token
- * @return {?}
- */
- CompileMetadataResolver.prototype._getTokenMetadata = function (token) {
- token = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_11" /* resolveForwardRef */])(token);
- var /** @type {?} */ compileToken;
- if (typeof token === 'string') {
- compileToken = { value: token };
- }
- else {
- compileToken = { identifier: { reference: token } };
- }
- return compileToken;
- };
- /**
- * @param {?} providers
- * @param {?} targetEntryComponents
- * @param {?=} debugInfo
- * @param {?=} compileProviders
- * @param {?=} type
- * @return {?}
- */
- CompileMetadataResolver.prototype._getProvidersMetadata = function (providers, targetEntryComponents, debugInfo, compileProviders, type) {
- var _this = this;
- if (compileProviders === void 0) { compileProviders = []; }
- providers.forEach(function (provider, providerIdx) {
- if (Array.isArray(provider)) {
- _this._getProvidersMetadata(provider, targetEntryComponents, debugInfo, compileProviders);
- }
- else {
- provider = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_11" /* resolveForwardRef */])(provider);
- var /** @type {?} */ providerMeta = void 0;
- if (provider && typeof provider == 'object' && provider.hasOwnProperty('provide')) {
- providerMeta = new __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["u" /* ProviderMeta */](provider.provide, provider);
- }
- else if (isValidType(provider)) {
- providerMeta = new __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["u" /* ProviderMeta */](provider, { useClass: provider });
- }
- else {
- var /** @type {?} */ providersInfo = ((providers.reduce(function (soFar, seenProvider, seenProviderIdx) {
- if (seenProviderIdx < providerIdx) {
- soFar.push("" + stringifyType(seenProvider));
- }
- else if (seenProviderIdx == providerIdx) {
- soFar.push("?" + stringifyType(seenProvider) + "?");
- }
- else if (seenProviderIdx == providerIdx + 1) {
- soFar.push('...');
- }
- return soFar;
- }, [])))
- .join(', ');
- _this._reportError(new __WEBPACK_IMPORTED_MODULE_16__util__["e" /* SyntaxError */]("Invalid " + (debugInfo ? debugInfo : 'provider') + " - only instances of Provider and Type are allowed, got: [" + providersInfo + "]"), type);
- }
- if (providerMeta.token === __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__identifiers__["e" /* resolveIdentifier */])(__WEBPACK_IMPORTED_MODULE_7__identifiers__["b" /* Identifiers */].ANALYZE_FOR_ENTRY_COMPONENTS)) {
- targetEntryComponents.push.apply(targetEntryComponents, _this._getEntryComponentsFromProvider(providerMeta, type));
- }
- else {
- compileProviders.push(_this.getProviderMetadata(providerMeta));
- }
- }
- });
- return compileProviders;
- };
- /**
- * @param {?} provider
- * @param {?=} type
- * @return {?}
- */
- CompileMetadataResolver.prototype._getEntryComponentsFromProvider = function (provider, type) {
- var _this = this;
- var /** @type {?} */ components = [];
- var /** @type {?} */ collectedIdentifiers = [];
- if (provider.useFactory || provider.useExisting || provider.useClass) {
- this._reportError(new __WEBPACK_IMPORTED_MODULE_16__util__["e" /* SyntaxError */]("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports useValue!"), type);
- return [];
- }
- if (!provider.multi) {
- this._reportError(new __WEBPACK_IMPORTED_MODULE_16__util__["e" /* SyntaxError */]("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports 'multi = true'!"), type);
- return [];
- }
- extractIdentifiers(provider.useValue, collectedIdentifiers);
- collectedIdentifiers.forEach(function (identifier) {
- if (_this._directiveResolver.isDirective(identifier.reference) ||
- _this._loadSummary(identifier.reference, __WEBPACK_IMPORTED_MODULE_3__compile_metadata__["q" /* CompileSummaryKind */].Directive)) {
- components.push(identifier);
- }
- });
- return components;
- };
- /**
- * @param {?} provider
- * @return {?}
- */
- CompileMetadataResolver.prototype.getProviderMetadata = function (provider) {
- var /** @type {?} */ compileDeps;
- var /** @type {?} */ compileTypeMetadata = null;
- var /** @type {?} */ compileFactoryMetadata = null;
- var /** @type {?} */ token = this._getTokenMetadata(provider.token);
- if (provider.useClass) {
- compileTypeMetadata = this._getInjectableMetadata(provider.useClass, provider.dependencies);
- compileDeps = compileTypeMetadata.diDeps;
- if (provider.token === provider.useClass) {
- // use the compileTypeMetadata as it contains information about lifecycleHooks...
- token = { identifier: compileTypeMetadata };
- }
- }
- else if (provider.useFactory) {
- compileFactoryMetadata = this._getFactoryMetadata(provider.useFactory, provider.dependencies);
- compileDeps = compileFactoryMetadata.diDeps;
- }
- return {
- token: token,
- useClass: compileTypeMetadata,
- useValue: provider.useValue,
- useFactory: compileFactoryMetadata,
- useExisting: provider.useExisting ? this._getTokenMetadata(provider.useExisting) : null,
- deps: compileDeps,
- multi: provider.multi
- };
- };
- /**
- * @param {?} queries
- * @param {?} isViewQuery
- * @param {?} directiveType
- * @return {?}
- */
- CompileMetadataResolver.prototype._getQueriesMetadata = function (queries, isViewQuery, directiveType) {
- var _this = this;
- var /** @type {?} */ res = [];
- Object.keys(queries).forEach(function (propertyName) {
- var /** @type {?} */ query = queries[propertyName];
- if (query.isViewQuery === isViewQuery) {
- res.push(_this._getQueryMetadata(query, propertyName, directiveType));
- }
- });
- return res;
- };
- /**
- * @param {?} selector
- * @return {?}
- */
- CompileMetadataResolver.prototype._queryVarBindings = function (selector) { return selector.split(/\s*,\s*/); };
- /**
- * @param {?} q
- * @param {?} propertyName
- * @param {?} typeOrFunc
- * @return {?}
- */
- CompileMetadataResolver.prototype._getQueryMetadata = function (q, propertyName, typeOrFunc) {
- var _this = this;
- var /** @type {?} */ selectors;
- if (typeof q.selector === 'string') {
- selectors =
- this._queryVarBindings(q.selector).map(function (varName) { return _this._getTokenMetadata(varName); });
- }
- else {
- if (!q.selector) {
- this._reportError(new __WEBPACK_IMPORTED_MODULE_16__util__["e" /* SyntaxError */]("Can't construct a query for the property \"" + propertyName + "\" of \"" + stringifyType(typeOrFunc) + "\" since the query selector wasn't defined."), typeOrFunc);
- }
- selectors = [this._getTokenMetadata(q.selector)];
- }
- return {
- selectors: selectors,
- first: q.first,
- descendants: q.descendants, propertyName: propertyName,
- read: q.read ? this._getTokenMetadata(q.read) : null
- };
- };
- /**
- * @param {?} error
- * @param {?=} type
- * @param {?=} otherType
- * @return {?}
- */
- CompileMetadataResolver.prototype._reportError = function (error, type, otherType) {
- if (this._errorCollector) {
- this._errorCollector(error, type);
- if (otherType) {
- this._errorCollector(error, otherType);
- }
- }
- else {
- throw error;
- }
- };
- /** @nocollapse */
- CompileMetadataResolver.ctorParameters = function () { return [
- { type: __WEBPACK_IMPORTED_MODULE_10__ng_module_resolver__["a" /* NgModuleResolver */], },
- { type: __WEBPACK_IMPORTED_MODULE_5__directive_resolver__["a" /* DirectiveResolver */], },
- { type: __WEBPACK_IMPORTED_MODULE_11__pipe_resolver__["a" /* PipeResolver */], },
- { type: __WEBPACK_IMPORTED_MODULE_14__summary_resolver__["a" /* SummaryResolver */], },
- { type: __WEBPACK_IMPORTED_MODULE_13__schema_element_schema_registry__["a" /* ElementSchemaRegistry */], },
- { type: __WEBPACK_IMPORTED_MODULE_4__directive_normalizer__["a" /* DirectiveNormalizer */], },
- { type: __WEBPACK_IMPORTED_MODULE_12__private_import_core__["K" /* ReflectorReader */], },
- { type: undefined, decorators: [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Optional */] }, { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["q" /* Inject */], args: [ERROR_COLLECTOR_TOKEN,] },] },
- ]; };
- CompileMetadataResolver = __decorate([
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__injectable__["a" /* CompilerInjectable */])(),
- __metadata('design:paramtypes', [__WEBPACK_IMPORTED_MODULE_10__ng_module_resolver__["a" /* NgModuleResolver */], __WEBPACK_IMPORTED_MODULE_5__directive_resolver__["a" /* DirectiveResolver */], __WEBPACK_IMPORTED_MODULE_11__pipe_resolver__["a" /* PipeResolver */], __WEBPACK_IMPORTED_MODULE_14__summary_resolver__["a" /* SummaryResolver */], __WEBPACK_IMPORTED_MODULE_13__schema_element_schema_registry__["a" /* ElementSchemaRegistry */], __WEBPACK_IMPORTED_MODULE_4__directive_normalizer__["a" /* DirectiveNormalizer */], __WEBPACK_IMPORTED_MODULE_12__private_import_core__["K" /* ReflectorReader */], Function])
- ], CompileMetadataResolver);
- return CompileMetadataResolver;
-}());
-function CompileMetadataResolver_tsickle_Closure_declarations() {
- /**
- * @nocollapse
- * @type {?}
- */
- CompileMetadataResolver.ctorParameters;
- /** @type {?} */
- CompileMetadataResolver.prototype._directiveCache;
- /** @type {?} */
- CompileMetadataResolver.prototype._summaryCache;
- /** @type {?} */
- CompileMetadataResolver.prototype._pipeCache;
- /** @type {?} */
- CompileMetadataResolver.prototype._ngModuleCache;
- /** @type {?} */
- CompileMetadataResolver.prototype._ngModuleOfTypes;
- /** @type {?} */
- CompileMetadataResolver.prototype._ngModuleResolver;
- /** @type {?} */
- CompileMetadataResolver.prototype._directiveResolver;
- /** @type {?} */
- CompileMetadataResolver.prototype._pipeResolver;
- /** @type {?} */
- CompileMetadataResolver.prototype._summaryResolver;
- /** @type {?} */
- CompileMetadataResolver.prototype._schemaRegistry;
- /** @type {?} */
- CompileMetadataResolver.prototype._directiveNormalizer;
- /** @type {?} */
- CompileMetadataResolver.prototype._reflector;
- /** @type {?} */
- CompileMetadataResolver.prototype._errorCollector;
-}
-/**
- * @param {?} tree
- * @param {?=} out
- * @return {?}
- */
-function flattenArray(tree, out) {
- if (out === void 0) { out = []; }
- if (tree) {
- for (var /** @type {?} */ i = 0; i < tree.length; i++) {
- var /** @type {?} */ item = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_11" /* resolveForwardRef */])(tree[i]);
- if (Array.isArray(item)) {
- flattenArray(item, out);
- }
- else {
- out.push(item);
- }
- }
- }
- return out;
-}
-/**
- * @param {?} array
- * @return {?}
- */
-function dedupeArray(array) {
- if (array) {
- return Array.from(new Set(array));
- }
- return [];
-}
-/**
- * @param {?} tree
- * @return {?}
- */
-function flattenAndDedupeArray(tree) {
- return dedupeArray(flattenArray(tree));
-}
-/**
- * @param {?} value
- * @return {?}
- */
-function isValidType(value) {
- return (value instanceof __WEBPACK_IMPORTED_MODULE_1__aot_static_symbol__["a" /* StaticSymbol */]) || (value instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["_14" /* Type */]);
-}
-/**
- * @param {?} reflector
- * @param {?} type
- * @param {?} cmpMetadata
- * @return {?}
- */
-function componentModuleUrl(reflector, type, cmpMetadata) {
- if (type instanceof __WEBPACK_IMPORTED_MODULE_1__aot_static_symbol__["a" /* StaticSymbol */]) {
- return type.filePath;
- }
- var /** @type {?} */ moduleId = cmpMetadata.moduleId;
- if (typeof moduleId === 'string') {
- var /** @type {?} */ scheme = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_15__url_resolver__["b" /* getUrlScheme */])(moduleId);
- return scheme ? moduleId : "package:" + moduleId + __WEBPACK_IMPORTED_MODULE_16__util__["f" /* MODULE_SUFFIX */];
- }
- else if (moduleId !== null && moduleId !== void 0) {
- throw new __WEBPACK_IMPORTED_MODULE_16__util__["e" /* SyntaxError */](("moduleId should be a string in \"" + stringifyType(type) + "\". See https://goo.gl/wIDDiL for more information.\n") +
- "If you're using Webpack you should inline the template and the styles, see https://goo.gl/X2J8zc.");
- }
- return reflector.importUri(type);
-}
-/**
- * @param {?} value
- * @param {?} targetIdentifiers
- * @return {?}
- */
-function extractIdentifiers(value, targetIdentifiers) {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_16__util__["b" /* visitValue */])(value, new _CompileValueConverter(), targetIdentifiers);
-}
-var _CompileValueConverter = (function (_super) {
- __extends(_CompileValueConverter, _super);
- function _CompileValueConverter() {
- _super.apply(this, arguments);
- }
- /**
- * @param {?} value
- * @param {?} targetIdentifiers
- * @return {?}
- */
- _CompileValueConverter.prototype.visitOther = function (value, targetIdentifiers) {
- targetIdentifiers.push({ reference: value });
- };
- return _CompileValueConverter;
-}(__WEBPACK_IMPORTED_MODULE_16__util__["g" /* ValueTransformer */]));
-/**
- * @param {?} type
- * @return {?}
- */
-function stringifyType(type) {
- if (type instanceof __WEBPACK_IMPORTED_MODULE_1__aot_static_symbol__["a" /* StaticSymbol */]) {
- return type.name + " in " + type.filePath;
- }
- else {
- return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__facade_lang__["e" /* stringify */])(type);
- }
-}
-//# sourceMappingURL=metadata_resolver.js.map
-
-/***/ }),
-/* 117 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__facade_collection__ = __webpack_require__(78);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__facade_lang__ = __webpack_require__(6);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__injectable__ = __webpack_require__(20);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__private_import_core__ = __webpack_require__(17);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return NgModuleResolver; });
-/**
- * @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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-var __metadata = (this && this.__metadata) || function (k, v) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
-};
-
-
-
-
-
-/**
- * @param {?} obj
- * @return {?}
- */
-function _isNgModuleMetadata(obj) {
- return obj instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["a" /* NgModule */];
-}
-/**
- * Resolves types to {\@link NgModule}.
- */
-var NgModuleResolver = (function () {
- /**
- * @param {?=} _reflector
- */
- function NgModuleResolver(_reflector) {
- if (_reflector === void 0) { _reflector = __WEBPACK_IMPORTED_MODULE_4__private_import_core__["c" /* reflector */]; }
- this._reflector = _reflector;
- }
- /**
- * @param {?} type
- * @return {?}
- */
- NgModuleResolver.prototype.isNgModule = function (type) { return this._reflector.annotations(type).some(_isNgModuleMetadata); };
- /**
- * @param {?} type
- * @param {?=} throwIfNotFound
- * @return {?}
- */
- NgModuleResolver.prototype.resolve = function (type, throwIfNotFound) {
- if (throwIfNotFound === void 0) { throwIfNotFound = true; }
- var /** @type {?} */ ngModuleMeta = __WEBPACK_IMPORTED_MODULE_1__facade_collection__["b" /* ListWrapper */].findLast(this._reflector.annotations(type), _isNgModuleMetadata);
- if (ngModuleMeta) {
- return ngModuleMeta;
- }
- else {
- if (throwIfNotFound) {
- throw new Error("No NgModule metadata found for '" + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__facade_lang__["e" /* stringify */])(type) + "'.");
- }
- return null;
- }
- };
- NgModuleResolver = __decorate([
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__injectable__["a" /* CompilerInjectable */])(),
- __metadata('design:paramtypes', [__WEBPACK_IMPORTED_MODULE_4__private_import_core__["K" /* ReflectorReader */]])
- ], NgModuleResolver);
- return NgModuleResolver;
-}());
-function NgModuleResolver_tsickle_Closure_declarations() {
- /** @type {?} */
- NgModuleResolver.prototype._reflector;
-}
-//# sourceMappingURL=ng_module_resolver.js.map
-
-/***/ }),
-/* 118 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__facade_collection__ = __webpack_require__(78);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__facade_lang__ = __webpack_require__(6);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__injectable__ = __webpack_require__(20);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__private_import_core__ = __webpack_require__(17);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PipeResolver; });
-/**
- * @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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-var __metadata = (this && this.__metadata) || function (k, v) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
-};
-
-
-
-
-
-/**
- * @param {?} type
- * @return {?}
- */
-function _isPipeMetadata(type) {
- return type instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["p" /* Pipe */];
-}
-/**
- * Resolve a `Type` for {\@link Pipe}.
- *
- * This interface can be overridden by the application developer to create custom behavior.
- *
- * See {\@link Compiler}
- */
-var PipeResolver = (function () {
- /**
- * @param {?=} _reflector
- */
- function PipeResolver(_reflector) {
- if (_reflector === void 0) { _reflector = __WEBPACK_IMPORTED_MODULE_4__private_import_core__["c" /* reflector */]; }
- this._reflector = _reflector;
- }
- /**
- * @param {?} type
- * @return {?}
- */
- PipeResolver.prototype.isPipe = function (type) {
- var /** @type {?} */ typeMetadata = this._reflector.annotations(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_11" /* resolveForwardRef */])(type));
- return typeMetadata && typeMetadata.some(_isPipeMetadata);
- };
- /**
- * Return {\@link Pipe} for a given `Type`.
- * @param {?} type
- * @param {?=} throwIfNotFound
- * @return {?}
- */
- PipeResolver.prototype.resolve = function (type, throwIfNotFound) {
- if (throwIfNotFound === void 0) { throwIfNotFound = true; }
- var /** @type {?} */ metas = this._reflector.annotations(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_11" /* resolveForwardRef */])(type));
- if (metas) {
- var /** @type {?} */ annotation = __WEBPACK_IMPORTED_MODULE_1__facade_collection__["b" /* ListWrapper */].findLast(metas, _isPipeMetadata);
- if (annotation) {
- return annotation;
- }
- }
- if (throwIfNotFound) {
- throw new Error("No Pipe decorator found on " + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__facade_lang__["e" /* stringify */])(type));
- }
- return null;
- };
- PipeResolver = __decorate([
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__injectable__["a" /* CompilerInjectable */])(),
- __metadata('design:paramtypes', [__WEBPACK_IMPORTED_MODULE_4__private_import_core__["K" /* ReflectorReader */]])
- ], PipeResolver);
- return PipeResolver;
-}());
-function PipeResolver_tsickle_Closure_declarations() {
- /** @type {?} */
- PipeResolver.prototype._reflector;
-}
-//# sourceMappingURL=pipe_resolver.js.map
-
-/***/ }),
-/* 119 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__compile_metadata__ = __webpack_require__(15);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__expression_parser_parser__ = __webpack_require__(91);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__facade_lang__ = __webpack_require__(6);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__i18n_i18n_html_parser__ = __webpack_require__(157);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__identifiers__ = __webpack_require__(19);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__injectable__ = __webpack_require__(20);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ml_parser_ast__ = __webpack_require__(68);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__ml_parser_html_parser__ = __webpack_require__(79);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__ml_parser_icu_ast_expander__ = __webpack_require__(558);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__ml_parser_interpolation_config__ = __webpack_require__(46);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__ml_parser_tags__ = __webpack_require__(80);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__parse_util__ = __webpack_require__(38);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__private_import_core__ = __webpack_require__(17);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__provider_analyzer__ = __webpack_require__(347);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__schema_element_schema_registry__ = __webpack_require__(69);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__selector__ = __webpack_require__(162);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__style_url_resolver__ = __webpack_require__(348);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__util__ = __webpack_require__(32);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__binding_parser__ = __webpack_require__(349);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__template_ast__ = __webpack_require__(47);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__template_preparser__ = __webpack_require__(350);
-/* unused harmony export TEMPLATE_TRANSFORMS */
-/* unused harmony export TemplateParseError */
-/* unused harmony export TemplateParseResult */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TemplateParser; });
-/* unused harmony export splitClasses */
-/* unused harmony export createElementCssSelector */
-/* unused harmony export removeSummaryDuplicates */
-/**
- * @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 = (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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-var __metadata = (this && this.__metadata) || function (k, v) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-// Group 1 = "bind-"
-// Group 2 = "let-"
-// Group 3 = "ref-/#"
-// Group 4 = "on-"
-// Group 5 = "bindon-"
-// Group 6 = "@"
-// Group 7 = the identifier after "bind-", "let-", "ref-/#", "on-", "bindon-" or "@"
-// Group 8 = identifier inside [()]
-// Group 9 = identifier inside []
-// Group 10 = identifier inside ()
-var /** @type {?} */ BIND_NAME_REGEXP = /^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.+))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/;
-var /** @type {?} */ KW_BIND_IDX = 1;
-var /** @type {?} */ KW_LET_IDX = 2;
-var /** @type {?} */ KW_REF_IDX = 3;
-var /** @type {?} */ KW_ON_IDX = 4;
-var /** @type {?} */ KW_BINDON_IDX = 5;
-var /** @type {?} */ KW_AT_IDX = 6;
-var /** @type {?} */ IDENT_KW_IDX = 7;
-var /** @type {?} */ IDENT_BANANA_BOX_IDX = 8;
-var /** @type {?} */ IDENT_PROPERTY_IDX = 9;
-var /** @type {?} */ IDENT_EVENT_IDX = 10;
-var /** @type {?} */ TEMPLATE_ELEMENT = 'template';
-var /** @type {?} */ TEMPLATE_ATTR = 'template';
-var /** @type {?} */ TEMPLATE_ATTR_PREFIX = '*';
-var /** @type {?} */ CLASS_ATTR = 'class';
-var /** @type {?} */ TEXT_CSS_SELECTOR = __WEBPACK_IMPORTED_MODULE_16__selector__["a" /* CssSelector */].parse('*')[0];
-/**
- * Provides an array of {@link TemplateAstVisitor}s which will be used to transform
- * parsed templates before compilation is invoked, allowing custom expression syntax
- * and other advanced transformations.
- *
- * This is currently an internal-only feature and not meant for general use.
- */
-var /** @type {?} */ TEMPLATE_TRANSFORMS = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["H" /* OpaqueToken */]('TemplateTransforms');
-var TemplateParseError = (function (_super) {
- __extends(TemplateParseError, _super);
- /**
- * @param {?} message
- * @param {?} span
- * @param {?} level
- */
- function TemplateParseError(message, span, level) {
- _super.call(this, span, message, level);
- }
- return TemplateParseError;
-}(__WEBPACK_IMPORTED_MODULE_12__parse_util__["a" /* ParseError */]));
-var TemplateParseResult = (function () {
- /**
- * @param {?=} templateAst
- * @param {?=} errors
- */
- function TemplateParseResult(templateAst, errors) {
- this.templateAst = templateAst;
- this.errors = errors;
- }
- return TemplateParseResult;
-}());
-function TemplateParseResult_tsickle_Closure_declarations() {
- /** @type {?} */
- TemplateParseResult.prototype.templateAst;
- /** @type {?} */
- TemplateParseResult.prototype.errors;
-}
-var TemplateParser = (function () {
- /**
- * @param {?} _exprParser
- * @param {?} _schemaRegistry
- * @param {?} _htmlParser
- * @param {?} _console
- * @param {?} transforms
- */
- function TemplateParser(_exprParser, _schemaRegistry, _htmlParser, _console, transforms) {
- this._exprParser = _exprParser;
- this._schemaRegistry = _schemaRegistry;
- this._htmlParser = _htmlParser;
- this._console = _console;
- this.transforms = transforms;
- }
- /**
- * @param {?} component
- * @param {?} template
- * @param {?} directives
- * @param {?} pipes
- * @param {?} schemas
- * @param {?} templateUrl
- * @return {?}
- */
- TemplateParser.prototype.parse = function (component, template, directives, pipes, schemas, templateUrl) {
- var /** @type {?} */ result = this.tryParse(component, template, directives, pipes, schemas, templateUrl);
- var /** @type {?} */ warnings = result.errors.filter(function (error) { return error.level === __WEBPACK_IMPORTED_MODULE_12__parse_util__["e" /* ParseErrorLevel */].WARNING; });
- var /** @type {?} */ errors = result.errors.filter(function (error) { return error.level === __WEBPACK_IMPORTED_MODULE_12__parse_util__["e" /* ParseErrorLevel */].FATAL; });
- if (warnings.length > 0) {
- this._console.warn("Template parse warnings:\n" + warnings.join('\n'));
- }
- if (errors.length > 0) {
- var /** @type {?} */ errorString = errors.join('\n');
- throw new __WEBPACK_IMPORTED_MODULE_18__util__["e" /* SyntaxError */]("Template parse errors:\n" + errorString);
- }
- return result.templateAst;
- };
- /**
- * @param {?} component
- * @param {?} template
- * @param {?} directives
- * @param {?} pipes
- * @param {?} schemas
- * @param {?} templateUrl
- * @return {?}
- */
- TemplateParser.prototype.tryParse = function (component, template, directives, pipes, schemas, templateUrl) {
- return this.tryParseHtml(this.expandHtml(this._htmlParser.parse(template, templateUrl, true, this.getInterpolationConfig(component))), component, template, directives, pipes, schemas, templateUrl);
- };
- /**
- * @param {?} htmlAstWithErrors
- * @param {?} component
- * @param {?} template
- * @param {?} directives
- * @param {?} pipes
- * @param {?} schemas
- * @param {?} templateUrl
- * @return {?}
- */
- TemplateParser.prototype.tryParseHtml = function (htmlAstWithErrors, component, template, directives, pipes, schemas, templateUrl) {
- var /** @type {?} */ result;
- var /** @type {?} */ errors = htmlAstWithErrors.errors;
- if (htmlAstWithErrors.rootNodes.length > 0) {
- var /** @type {?} */ uniqDirectives = removeSummaryDuplicates(directives);
- var /** @type {?} */ uniqPipes = removeSummaryDuplicates(pipes);
- var /** @type {?} */ providerViewContext = new __WEBPACK_IMPORTED_MODULE_14__provider_analyzer__["b" /* ProviderViewContext */](component, htmlAstWithErrors.rootNodes[0].sourceSpan);
- var /** @type {?} */ interpolationConfig = void 0;
- if (component.template && component.template.interpolation) {
- interpolationConfig = {
- start: component.template.interpolation[0],
- end: component.template.interpolation[1]
- };
- }
- var /** @type {?} */ bindingParser = new __WEBPACK_IMPORTED_MODULE_19__binding_parser__["a" /* BindingParser */](this._exprParser, interpolationConfig, this._schemaRegistry, uniqPipes, errors);
- var /** @type {?} */ parseVisitor = new TemplateParseVisitor(providerViewContext, uniqDirectives, bindingParser, this._schemaRegistry, schemas, errors);
- result = __WEBPACK_IMPORTED_MODULE_7__ml_parser_ast__["g" /* visitAll */](parseVisitor, htmlAstWithErrors.rootNodes, EMPTY_ELEMENT_CONTEXT);
- errors.push.apply(errors, providerViewContext.errors);
- }
- else {
- result = [];
- }
- this._assertNoReferenceDuplicationOnTemplate(result, errors);
- if (errors.length > 0) {
- return new TemplateParseResult(result, errors);
- }
- if (this.transforms) {
- this.transforms.forEach(function (transform) { result = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_20__template_ast__["a" /* templateVisitAll */])(transform, result); });
- }
- return new TemplateParseResult(result, errors);
- };
- /**
- * @param {?} htmlAstWithErrors
- * @param {?=} forced
- * @return {?}
- */
- TemplateParser.prototype.expandHtml = function (htmlAstWithErrors, forced) {
- if (forced === void 0) { forced = false; }
- var /** @type {?} */ errors = htmlAstWithErrors.errors;
- if (errors.length == 0 || forced) {
- // Transform ICU messages to angular directives
- var /** @type {?} */ expandedHtmlAst = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__ml_parser_icu_ast_expander__["a" /* expandNodes */])(htmlAstWithErrors.rootNodes);
- errors.push.apply(errors, expandedHtmlAst.errors);
- htmlAstWithErrors = new __WEBPACK_IMPORTED_MODULE_8__ml_parser_html_parser__["b" /* ParseTreeResult */](expandedHtmlAst.nodes, errors);
- }
- return htmlAstWithErrors;
- };
- /**
- * @param {?} component
- * @return {?}
- */
- TemplateParser.prototype.getInterpolationConfig = function (component) {
- if (component.template) {
- return __WEBPACK_IMPORTED_MODULE_10__ml_parser_interpolation_config__["b" /* InterpolationConfig */].fromArray(component.template.interpolation);
- }
- };
- /**
- * \@internal
- * @param {?} result
- * @param {?} errors
- * @return {?}
- */
- TemplateParser.prototype._assertNoReferenceDuplicationOnTemplate = function (result, errors) {
- var /** @type {?} */ existingReferences = [];
- result.filter(function (element) { return !!((element)).references; })
- .forEach(function (element) { return ((element)).references.forEach(function (reference) {
- var /** @type {?} */ name = reference.name;
- if (existingReferences.indexOf(name) < 0) {
- existingReferences.push(name);
- }
- else {
- var /** @type {?} */ error = new TemplateParseError("Reference \"#" + name + "\" is defined several times", reference.sourceSpan, __WEBPACK_IMPORTED_MODULE_12__parse_util__["e" /* ParseErrorLevel */].FATAL);
- errors.push(error);
- }
- }); });
- };
- /** @nocollapse */
- TemplateParser.ctorParameters = function () { return [
- { type: __WEBPACK_IMPORTED_MODULE_2__expression_parser_parser__["a" /* Parser */], },
- { type: __WEBPACK_IMPORTED_MODULE_15__schema_element_schema_registry__["a" /* ElementSchemaRegistry */], },
- { type: __WEBPACK_IMPORTED_MODULE_4__i18n_i18n_html_parser__["a" /* I18NHtmlParser */], },
- { type: __WEBPACK_IMPORTED_MODULE_13__private_import_core__["F" /* Console */], },
- { type: Array, decorators: [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Optional */] }, { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["q" /* Inject */], args: [TEMPLATE_TRANSFORMS,] },] },
- ]; };
- TemplateParser = __decorate([
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__injectable__["a" /* CompilerInjectable */])(),
- __metadata('design:paramtypes', [__WEBPACK_IMPORTED_MODULE_2__expression_parser_parser__["a" /* Parser */], __WEBPACK_IMPORTED_MODULE_15__schema_element_schema_registry__["a" /* ElementSchemaRegistry */], __WEBPACK_IMPORTED_MODULE_4__i18n_i18n_html_parser__["a" /* I18NHtmlParser */], __WEBPACK_IMPORTED_MODULE_13__private_import_core__["F" /* Console */], Array])
- ], TemplateParser);
- return TemplateParser;
-}());
-function TemplateParser_tsickle_Closure_declarations() {
- /**
- * @nocollapse
- * @type {?}
- */
- TemplateParser.ctorParameters;
- /** @type {?} */
- TemplateParser.prototype._exprParser;
- /** @type {?} */
- TemplateParser.prototype._schemaRegistry;
- /** @type {?} */
- TemplateParser.prototype._htmlParser;
- /** @type {?} */
- TemplateParser.prototype._console;
- /** @type {?} */
- TemplateParser.prototype.transforms;
-}
-var TemplateParseVisitor = (function () {
- /**
- * @param {?} providerViewContext
- * @param {?} directives
- * @param {?} _bindingParser
- * @param {?} _schemaRegistry
- * @param {?} _schemas
- * @param {?} _targetErrors
- */
- function TemplateParseVisitor(providerViewContext, directives, _bindingParser, _schemaRegistry, _schemas, _targetErrors) {
- var _this = this;
- this.providerViewContext = providerViewContext;
- this._bindingParser = _bindingParser;
- this._schemaRegistry = _schemaRegistry;
- this._schemas = _schemas;
- this._targetErrors = _targetErrors;
- this.selectorMatcher = new __WEBPACK_IMPORTED_MODULE_16__selector__["b" /* SelectorMatcher */]();
- this.directivesIndex = new Map();
- this.ngContentCount = 0;
- directives.forEach(function (directive, index) {
- var selector = __WEBPACK_IMPORTED_MODULE_16__selector__["a" /* CssSelector */].parse(directive.selector);
- _this.selectorMatcher.addSelectables(selector, directive);
- _this.directivesIndex.set(directive, index);
- });
- }
- /**
- * @param {?} expansion
- * @param {?} context
- * @return {?}
- */
- TemplateParseVisitor.prototype.visitExpansion = function (expansion, context) { return null; };
- /**
- * @param {?} expansionCase
- * @param {?} context
- * @return {?}
- */
- TemplateParseVisitor.prototype.visitExpansionCase = function (expansionCase, context) { return null; };
- /**
- * @param {?} text
- * @param {?} parent
- * @return {?}
- */
- TemplateParseVisitor.prototype.visitText = function (text, parent) {
- var /** @type {?} */ ngContentIndex = parent.findNgContentIndex(TEXT_CSS_SELECTOR);
- var /** @type {?} */ expr = this._bindingParser.parseInterpolation(text.value, text.sourceSpan);
- if (expr) {
- return new __WEBPACK_IMPORTED_MODULE_20__template_ast__["h" /* BoundTextAst */](expr, ngContentIndex, text.sourceSpan);
- }
- else {
- return new __WEBPACK_IMPORTED_MODULE_20__template_ast__["i" /* TextAst */](text.value, ngContentIndex, text.sourceSpan);
- }
- };
- /**
- * @param {?} attribute
- * @param {?} context
- * @return {?}
- */
- TemplateParseVisitor.prototype.visitAttribute = function (attribute, context) {
- return new __WEBPACK_IMPORTED_MODULE_20__template_ast__["j" /* AttrAst */](attribute.name, attribute.value, attribute.sourceSpan);
- };
- /**
- * @param {?} comment
- * @param {?} context
- * @return {?}
- */
- TemplateParseVisitor.prototype.visitComment = function (comment, context) { return null; };
- /**
- * @param {?} element
- * @param {?} parent
- * @return {?}
- */
- TemplateParseVisitor.prototype.visitElement = function (element, parent) {
- var _this = this;
- var /** @type {?} */ nodeName = element.name;
- var /** @type {?} */ preparsedElement = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_21__template_preparser__["a" /* preparseElement */])(element);
- if (preparsedElement.type === __WEBPACK_IMPORTED_MODULE_21__template_preparser__["b" /* PreparsedElementType */].SCRIPT ||
- preparsedElement.type === __WEBPACK_IMPORTED_MODULE_21__template_preparser__["b" /* PreparsedElementType */].STYLE) {
- // Skipping
+ *
+ *
+ *
+ *
+ *
+ *
+ *