/******/ (function(modules) { // webpackBootstrap /******/ // install a JSONP callback for chunk loading /******/ var parentJsonpFunction = window["webpackJsonp"]; /******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) { /******/ // add "moreModules" to the modules object, /******/ // then flag all "chunkIds" as loaded and fire callback /******/ var moduleId, chunkId, i = 0, callbacks = []; /******/ for(;i < chunkIds.length; i++) { /******/ chunkId = chunkIds[i]; /******/ if(installedChunks[chunkId]) /******/ callbacks.push.apply(callbacks, installedChunks[chunkId]); /******/ installedChunks[chunkId] = 0; /******/ } /******/ for(moduleId in moreModules) { /******/ var _m = moreModules[moduleId]; /******/ /******/ // Check if module is deduplicated /******/ switch(typeof _m) { /******/ case "object": /******/ // Module can be created from a template /******/ modules[moduleId] = (function(_m) { /******/ var args = _m.slice(1), templateId = _m[0]; /******/ return function (a,b,c) { /******/ modules[templateId].apply(this, [a,b,c].concat(args)); /******/ }; /******/ }(_m)); /******/ break; /******/ case "function": /******/ // Normal module /******/ modules[moduleId] = _m; /******/ break; /******/ default: /******/ // Module is a copy of another module /******/ modules[moduleId] = modules[_m]; /******/ break; /******/ } /******/ } /******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules); /******/ while(callbacks.length) /******/ callbacks.shift().call(null, __webpack_require__); /******/ if(moreModules[0]) { /******/ installedModules[0] = 0; /******/ return __webpack_require__(0); /******/ } /******/ }; /******/ /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // object to store loaded and loading chunks /******/ // "0" means "already loaded" /******/ // Array means "loading", array contains callbacks /******/ var installedChunks = { /******/ 0:0 /******/ }; /******/ /******/ // 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; /******/ } /******/ /******/ // This file contains only the entry chunk. /******/ // The chunk loading function for additional chunks /******/ __webpack_require__.e = function requireEnsure(chunkId, callback) { /******/ // "0" is the signal for "already loaded" /******/ if(installedChunks[chunkId] === 0) /******/ return callback.call(null, __webpack_require__); /******/ /******/ // an array means "currently loading". /******/ if(installedChunks[chunkId] !== undefined) { /******/ installedChunks[chunkId].push(callback); /******/ } else { /******/ // start chunk loading /******/ installedChunks[chunkId] = [callback]; /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); /******/ script.type = 'text/javascript'; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ /******/ script.src = __webpack_require__.p + "" + chunkId + ".chunk.js"; /******/ head.appendChild(script); /******/ } /******/ }; /******/ /******/ // 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); /******/ }) /************************************************************************/ /******/ ((function(modules) { // Check all modules for deduplicated modules for(var i in modules) { if(Object.prototype.hasOwnProperty.call(modules, i)) { switch(typeof modules[i]) { case "function": break; case "object": // Module can be created from a template modules[i] = (function(_m) { var args = _m.slice(1), fn = modules[_m[0]]; return function (a,b,c) { fn.apply(this, [a,b,c].concat(args)); }; }(modules[i])); break; default: // Module is a copy of another module modules[i] = modules[modules[i]]; break; } } } return modules; }([ /* 0 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(424); __webpack_require__(423); __webpack_require__(457); __webpack_require__(443); __webpack_require__(6); module.exports = __webpack_require__(1); /***/ }, /* 1 */ /***/ function(module, exports, __webpack_require__) { "use strict"; function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } /** * @module * @description * Starting point to import all public core APIs. */ __export(__webpack_require__(391)); __export(__webpack_require__(398)); __export(__webpack_require__(32)); var application_ref_1 = __webpack_require__(99); exports.createPlatform = application_ref_1.createPlatform; exports.assertPlatform = application_ref_1.assertPlatform; exports.disposePlatform = application_ref_1.disposePlatform; exports.getPlatform = application_ref_1.getPlatform; exports.coreBootstrap = application_ref_1.coreBootstrap; exports.coreLoadAndBootstrap = application_ref_1.coreLoadAndBootstrap; exports.createNgZone = application_ref_1.createNgZone; exports.PlatformRef = application_ref_1.PlatformRef; exports.ApplicationRef = application_ref_1.ApplicationRef; var application_tokens_1 = __webpack_require__(58); exports.APP_ID = application_tokens_1.APP_ID; exports.APP_INITIALIZER = application_tokens_1.APP_INITIALIZER; exports.PACKAGE_ROOT_URL = application_tokens_1.PACKAGE_ROOT_URL; exports.PLATFORM_INITIALIZER = application_tokens_1.PLATFORM_INITIALIZER; __export(__webpack_require__(399)); __export(__webpack_require__(397)); __export(__webpack_require__(387)); var debug_node_1 = __webpack_require__(183); exports.DebugElement = debug_node_1.DebugElement; exports.DebugNode = debug_node_1.DebugNode; exports.asNativeElements = debug_node_1.asNativeElements; exports.getDebugNode = debug_node_1.getDebugNode; __export(__webpack_require__(113)); __export(__webpack_require__(382)); __export(__webpack_require__(394)); __export(__webpack_require__(393)); __export(__webpack_require__(381)); __export(__webpack_require__(65)); var profile_1 = __webpack_require__(64); exports.wtfCreateScope = profile_1.wtfCreateScope; exports.wtfLeave = profile_1.wtfLeave; exports.wtfStartTimeRange = profile_1.wtfStartTimeRange; exports.wtfEndTimeRange = profile_1.wtfEndTimeRange; var lang_1 = __webpack_require__(4); exports.Type = lang_1.Type; exports.enableProdMode = lang_1.enableProdMode; var async_1 = __webpack_require__(27); exports.EventEmitter = async_1.EventEmitter; var exceptions_1 = __webpack_require__(9); exports.ExceptionHandler = exceptions_1.ExceptionHandler; exports.WrappedException = exceptions_1.WrappedException; exports.BaseException = exceptions_1.BaseException; __export(__webpack_require__(380)); //# sourceMappingURL=index.js.map /***/ }, /* 2 */, /* 3 */, /* 4 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {"use strict"; 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 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; } function scheduleMicroTask(fn) { Zone.current.scheduleMicroTask('scheduleMicrotask', fn); } exports.scheduleMicroTask = scheduleMicroTask; exports.IS_DART = false; // Need to declare a new variable for global here since TypeScript // exports the original value of the symbol. var _global = globalScope; exports.global = _global; exports.Type = Function; function getTypeNameForDebugging(type) { if (type['name']) { return type['name']; } return typeof type; } exports.getTypeNameForDebugging = getTypeNameForDebugging; exports.Math = _global.Math; exports.Date = _global.Date; var _devMode = true; var _modeLocked = false; function lockMode() { _modeLocked = true; } exports.lockMode = lockMode; /** * Disable Angular's development mode, which turns off assertions and other * checks within the framework. * * One important assertion this disables verifies that a change detection pass * does not result in additional changes to any bindings (also known as * unidirectional data flow). */ function enableProdMode() { if (_modeLocked) { // Cannot use BaseException as that ends up importing from facade/lang. throw 'Cannot enable prod mode after platform setup.'; } _devMode = false; } exports.enableProdMode = enableProdMode; function assertionsEnabled() { return _devMode; } exports.assertionsEnabled = assertionsEnabled; // 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 }; function isPresent(obj) { return obj !== undefined && obj !== null; } exports.isPresent = isPresent; function isBlank(obj) { return obj === undefined || obj === null; } exports.isBlank = isBlank; function isBoolean(obj) { return typeof obj === "boolean"; } exports.isBoolean = isBoolean; function isNumber(obj) { return typeof obj === "number"; } exports.isNumber = isNumber; function isString(obj) { return typeof obj === "string"; } exports.isString = isString; function isFunction(obj) { return typeof obj === "function"; } exports.isFunction = isFunction; function isType(obj) { return isFunction(obj); } exports.isType = isType; function isStringMap(obj) { return typeof obj === 'object' && obj !== null; } exports.isStringMap = isStringMap; var STRING_MAP_PROTO = Object.getPrototypeOf({}); function isStrictStringMap(obj) { return isStringMap(obj) && Object.getPrototypeOf(obj) === STRING_MAP_PROTO; } exports.isStrictStringMap = isStrictStringMap; function isPromise(obj) { return obj instanceof _global.Promise; } exports.isPromise = isPromise; function isArray(obj) { return Array.isArray(obj); } exports.isArray = isArray; function isDate(obj) { return obj instanceof exports.Date && !isNaN(obj.valueOf()); } exports.isDate = isDate; function noop() { } exports.noop = noop; function stringify(token) { if (typeof token === 'string') { return token; } if (token === undefined || token === null) { return '' + token; } if (token.name) { return token.name; } if (token.overriddenName) { return token.overriddenName; } var res = token.toString(); var newLineIndex = res.indexOf("\n"); return (newLineIndex === -1) ? res : res.substring(0, newLineIndex); } exports.stringify = stringify; // serialize / deserialize enum exist only for consistency with dart API // enums in typescript don't need to be serialized function serializeEnum(val) { return val; } exports.serializeEnum = serializeEnum; function deserializeEnum(val, values) { return val; } exports.deserializeEnum = deserializeEnum; function resolveEnumToken(enumValue, val) { return enumValue[val]; } exports.resolveEnumToken = resolveEnumToken; var StringWrapper = (function () { function StringWrapper() { } StringWrapper.fromCharCode = function (code) { return String.fromCharCode(code); }; StringWrapper.charCodeAt = function (s, index) { return s.charCodeAt(index); }; StringWrapper.split = function (s, regExp) { return s.split(regExp); }; StringWrapper.equals = function (s, s2) { return s === s2; }; StringWrapper.stripLeft = function (s, charVal) { if (s && s.length) { var pos = 0; for (var i = 0; i < s.length; i++) { if (s[i] != charVal) break; pos++; } s = s.substring(pos); } return s; }; StringWrapper.stripRight = function (s, charVal) { if (s && s.length) { var pos = s.length; for (var i = s.length - 1; i >= 0; i--) { if (s[i] != charVal) break; pos--; } s = s.substring(0, pos); } return s; }; StringWrapper.replace = function (s, from, replace) { return s.replace(from, replace); }; StringWrapper.replaceAll = function (s, from, replace) { return s.replace(from, replace); }; StringWrapper.slice = function (s, from, to) { if (from === void 0) { from = 0; } if (to === void 0) { to = null; } return s.slice(from, to === null ? undefined : to); }; StringWrapper.replaceAllMapped = function (s, from, cb) { return s.replace(from, function () { var matches = []; for (var _i = 0; _i < arguments.length; _i++) { matches[_i - 0] = arguments[_i]; } // Remove offset & string from the result array matches.splice(-2, 2); // The callback receives match, p1, ..., pn return cb(matches); }); }; StringWrapper.contains = function (s, substr) { return s.indexOf(substr) != -1; }; StringWrapper.compare = function (a, b) { if (a < b) { return -1; } else if (a > b) { return 1; } else { return 0; } }; return StringWrapper; }()); exports.StringWrapper = StringWrapper; var StringJoiner = (function () { function StringJoiner(parts) { if (parts === void 0) { parts = []; } this.parts = parts; } StringJoiner.prototype.add = function (part) { this.parts.push(part); }; StringJoiner.prototype.toString = function () { return this.parts.join(""); }; return StringJoiner; }()); exports.StringJoiner = StringJoiner; var NumberParseError = (function (_super) { __extends(NumberParseError, _super); function NumberParseError(message) { _super.call(this); this.message = message; } NumberParseError.prototype.toString = function () { return this.message; }; return NumberParseError; }(Error)); exports.NumberParseError = NumberParseError; var NumberWrapper = (function () { function NumberWrapper() { } NumberWrapper.toFixed = function (n, fractionDigits) { return n.toFixed(fractionDigits); }; NumberWrapper.equal = function (a, b) { return a === b; }; NumberWrapper.parseIntAutoRadix = function (text) { var result = parseInt(text); if (isNaN(result)) { throw new NumberParseError("Invalid integer literal when parsing " + text); } return result; }; NumberWrapper.parseInt = function (text, radix) { if (radix == 10) { if (/^(\-|\+)?[0-9]+$/.test(text)) { return parseInt(text, radix); } } else if (radix == 16) { if (/^(\-|\+)?[0-9ABCDEFabcdef]+$/.test(text)) { return parseInt(text, radix); } } else { var result = parseInt(text, radix); if (!isNaN(result)) { return result; } } throw new NumberParseError("Invalid integer literal when parsing " + text + " in base " + radix); }; // TODO: NaN is a valid literal but is returned by parseFloat to indicate an error. NumberWrapper.parseFloat = function (text) { return parseFloat(text); }; Object.defineProperty(NumberWrapper, "NaN", { get: function () { return NaN; }, enumerable: true, configurable: true }); NumberWrapper.isNaN = function (value) { return isNaN(value); }; NumberWrapper.isInteger = function (value) { return Number.isInteger(value); }; return NumberWrapper; }()); exports.NumberWrapper = NumberWrapper; exports.RegExp = _global.RegExp; var RegExpWrapper = (function () { function RegExpWrapper() { } RegExpWrapper.create = function (regExpStr, flags) { if (flags === void 0) { flags = ''; } flags = flags.replace(/g/g, ''); return new _global.RegExp(regExpStr, flags + 'g'); }; RegExpWrapper.firstMatch = function (regExp, input) { // Reset multimatch regex state regExp.lastIndex = 0; return regExp.exec(input); }; RegExpWrapper.test = function (regExp, input) { regExp.lastIndex = 0; return regExp.test(input); }; RegExpWrapper.matcher = function (regExp, input) { // Reset regex state for the case // someone did not loop over all matches // last time. regExp.lastIndex = 0; return { re: regExp, input: input }; }; RegExpWrapper.replaceAll = function (regExp, input, replace) { var c = regExp.exec(input); var res = ''; regExp.lastIndex = 0; var prev = 0; while (c) { res += input.substring(prev, c.index); res += replace(c); prev = c.index + c[0].length; regExp.lastIndex = prev; c = regExp.exec(input); } res += input.substring(prev); return res; }; return RegExpWrapper; }()); exports.RegExpWrapper = RegExpWrapper; var RegExpMatcherWrapper = (function () { function RegExpMatcherWrapper() { } RegExpMatcherWrapper.next = function (matcher) { return matcher.re.exec(matcher.input); }; return RegExpMatcherWrapper; }()); exports.RegExpMatcherWrapper = RegExpMatcherWrapper; var FunctionWrapper = (function () { function FunctionWrapper() { } FunctionWrapper.apply = function (fn, posArgs) { return fn.apply(null, posArgs); }; return FunctionWrapper; }()); exports.FunctionWrapper = FunctionWrapper; // JS has NaN !== NaN function looseIdentical(a, b) { return a === b || typeof a === "number" && typeof b === "number" && isNaN(a) && isNaN(b); } exports.looseIdentical = looseIdentical; // JS considers NaN is the same as NaN for map Key (while NaN !== NaN otherwise) // see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map function getMapKey(value) { return value; } exports.getMapKey = getMapKey; function normalizeBlank(obj) { return isBlank(obj) ? null : obj; } exports.normalizeBlank = normalizeBlank; function normalizeBool(obj) { return isBlank(obj) ? false : obj; } exports.normalizeBool = normalizeBool; function isJsObject(o) { return o !== null && (typeof o === "function" || typeof o === "object"); } exports.isJsObject = isJsObject; function print(obj) { console.log(obj); } exports.print = print; function warn(obj) { console.warn(obj); } exports.warn = warn; // Can't be all uppercase as our transpiler would think it is a special directive... var Json = (function () { function Json() { } Json.parse = function (s) { return _global.JSON.parse(s); }; Json.stringify = function (data) { // Dart doesn't take 3 arguments return _global.JSON.stringify(data, null, 2); }; return Json; }()); exports.Json = Json; var DateWrapper = (function () { function DateWrapper() { } DateWrapper.create = function (year, month, day, hour, minutes, seconds, milliseconds) { if (month === void 0) { month = 1; } if (day === void 0) { day = 1; } if (hour === void 0) { hour = 0; } if (minutes === void 0) { minutes = 0; } if (seconds === void 0) { seconds = 0; } if (milliseconds === void 0) { milliseconds = 0; } return new exports.Date(year, month - 1, day, hour, minutes, seconds, milliseconds); }; DateWrapper.fromISOString = function (str) { return new exports.Date(str); }; DateWrapper.fromMillis = function (ms) { return new exports.Date(ms); }; DateWrapper.toMillis = function (date) { return date.getTime(); }; DateWrapper.now = function () { return new exports.Date(); }; DateWrapper.toJson = function (date) { return date.toJSON(); }; return DateWrapper; }()); exports.DateWrapper = DateWrapper; function setValueOnPath(global, path, value) { var parts = path.split('.'); var obj = global; while (parts.length > 1) { var name = parts.shift(); if (obj.hasOwnProperty(name) && isPresent(obj[name])) { obj = obj[name]; } else { obj = obj[name] = {}; } } if (obj === undefined || obj === null) { obj = {}; } obj[parts.shift()] = value; } exports.setValueOnPath = setValueOnPath; var _symbolIterator = null; function getSymbolIterator() { if (isBlank(_symbolIterator)) { if (isPresent(globalScope.Symbol) && isPresent(Symbol.iterator)) { _symbolIterator = Symbol.iterator; } else { // es6-shim specific logic var keys = Object.getOwnPropertyNames(Map.prototype); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; if (key !== 'entries' && key !== 'size' && Map.prototype[key] === Map.prototype['entries']) { _symbolIterator = key; } } } } return _symbolIterator; } exports.getSymbolIterator = getSymbolIterator; function evalExpression(sourceUrl, expr, declarations, vars) { var fnBody = declarations + "\nreturn " + expr + "\n//# sourceURL=" + sourceUrl; var fnArgNames = []; var fnArgValues = []; for (var argName in vars) { fnArgNames.push(argName); fnArgValues.push(vars[argName]); } return new (Function.bind.apply(Function, [void 0].concat(fnArgNames.concat(fnBody))))().apply(void 0, fnArgValues); } exports.evalExpression = evalExpression; function isPrimitive(obj) { return !isJsObject(obj); } exports.isPrimitive = isPrimitive; function hasConstructor(value, type) { return value.constructor === type; } exports.hasConstructor = hasConstructor; function bitWiseOr(values) { return values.reduce(function (a, b) { return a | b; }); } exports.bitWiseOr = bitWiseOr; function bitWiseAnd(values) { return values.reduce(function (a, b) { return a & b; }); } exports.bitWiseAnd = bitWiseAnd; function escape(s) { return _global.encodeURI(s); } exports.escape = escape; //# sourceMappingURL=lang.js.map /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, /* 5 */ 4, /* 6 */ /***/ function(module, exports, __webpack_require__) { "use strict"; function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } __export(__webpack_require__(354)); __export(__webpack_require__(142)); __export(__webpack_require__(152)); __export(__webpack_require__(346)); __export(__webpack_require__(351)); //# sourceMappingURL=index.js.map /***/ }, /* 7 */, /* 8 */, /* 9 */ [462, 186, 187, 187], /* 10 */, /* 11 */ [460, 4], /* 12 */, /* 13 */, /* 14 */ [460, 5], /* 15 */, /* 16 */, /* 17 */, /* 18 */ [459, 5, 74], /* 19 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var core_1 = __webpack_require__(1); /** * Used to provide a {@link ControlValueAccessor} for form controls. * * See {@link DefaultValueAccessor} for how to implement one. */ exports.NG_VALUE_ACCESSOR = /*@ts2dart_const*/ new core_1.OpaqueToken("NgValueAccessor"); //# sourceMappingURL=control_value_accessor.js.map /***/ }, /* 20 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var core_1 = __webpack_require__(1); var lang_1 = __webpack_require__(5); var promise_1 = __webpack_require__(74); var async_1 = __webpack_require__(18); var collection_1 = __webpack_require__(14); /** * Providers for validators to be used for {@link Control}s in a form. * * Provide this using `multi: true` to add validators. * * ### Example * * {@example core/forms/ts/ng_validators/ng_validators.ts region='ng_validators'} */ exports.NG_VALIDATORS = new core_1.OpaqueToken("NgValidators"); /** * Providers for asynchronous validators to be used for {@link Control}s * in a form. * * Provide this using `multi: true` to add validators. * * See {@link NG_VALIDATORS} for more details. */ exports.NG_ASYNC_VALIDATORS = /*@ts2dart_const*/ new core_1.OpaqueToken("NgAsyncValidators"); /** * Provides a set of validators used by form controls. * * A validator is a function that processes a {@link Control} or collection of * controls and returns a map of errors. A null map means that validation has passed. * * ### Example * * ```typescript * var loginControl = new Control("", Validators.required) * ``` */ var Validators = (function () { function Validators() { } /** * Validator that requires controls to have a non-empty value. */ Validators.required = function (control) { return lang_1.isBlank(control.value) || (lang_1.isString(control.value) && control.value == "") ? { "required": true } : null; }; /** * Validator that requires controls to have a value of a minimum length. */ Validators.minLength = function (minLength) { return function (control) { if (lang_1.isPresent(Validators.required(control))) return null; var v = control.value; return v.length < minLength ? { "minlength": { "requiredLength": minLength, "actualLength": v.length } } : null; }; }; /** * Validator that requires controls to have a value of a maximum length. */ Validators.maxLength = function (maxLength) { return function (control) { if (lang_1.isPresent(Validators.required(control))) return null; var v = control.value; return v.length > maxLength ? { "maxlength": { "requiredLength": maxLength, "actualLength": v.length } } : null; }; }; /** * Validator that requires a control to match a regex to its value. */ Validators.pattern = function (pattern) { return function (control) { if (lang_1.isPresent(Validators.required(control))) return null; var regex = new RegExp("^" + pattern + "$"); var v = control.value; return regex.test(v) ? null : { "pattern": { "requiredPattern": "^" + pattern + "$", "actualValue": v } }; }; }; /** * No-op validator. */ Validators.nullValidator = function (c) { return null; }; /** * Compose multiple validators into a single function that returns the union * of the individual error maps. */ Validators.compose = function (validators) { if (lang_1.isBlank(validators)) return null; var presentValidators = validators.filter(lang_1.isPresent); if (presentValidators.length == 0) return null; return function (control) { return _mergeErrors(_executeValidators(control, presentValidators)); }; }; Validators.composeAsync = function (validators) { if (lang_1.isBlank(validators)) return null; var presentValidators = validators.filter(lang_1.isPresent); if (presentValidators.length == 0) return null; return function (control) { var promises = _executeAsyncValidators(control, presentValidators).map(_convertToPromise); return promise_1.PromiseWrapper.all(promises).then(_mergeErrors); }; }; return Validators; }()); exports.Validators = Validators; function _convertToPromise(obj) { return promise_1.PromiseWrapper.isPromise(obj) ? obj : async_1.ObservableWrapper.toPromise(obj); } function _executeValidators(control, validators) { return validators.map(function (v) { return v(control); }); } function _executeAsyncValidators(control, validators) { return validators.map(function (v) { return v(control); }); } function _mergeErrors(arrayOfErrors) { var res = arrayOfErrors.reduce(function (res, errors) { return lang_1.isPresent(errors) ? collection_1.StringMapWrapper.merge(res, errors) : res; }, {}); return collection_1.StringMapWrapper.isEmpty(res) ? null : res; } //# sourceMappingURL=validators.js.map /***/ }, /* 21 */ /***/ function(module, exports, __webpack_require__) { "use strict"; 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 lang_1 = __webpack_require__(5); var exceptions_1 = __webpack_require__(23); var InvalidPipeArgumentException = (function (_super) { __extends(InvalidPipeArgumentException, _super); function InvalidPipeArgumentException(type, value) { _super.call(this, "Invalid argument '" + value + "' for pipe '" + lang_1.stringify(type) + "'"); } return InvalidPipeArgumentException; }(exceptions_1.BaseException)); exports.InvalidPipeArgumentException = InvalidPipeArgumentException; //# sourceMappingURL=invalid_pipe_argument_exception.js.map /***/ }, /* 22 */, /* 23 */ [462, 149, 150, 150], /* 24 */, /* 25 */, /* 26 */ /***/ function(module, exports, __webpack_require__) { "use strict"; 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 exceptions_1 = __webpack_require__(23); var abstract_control_directive_1 = __webpack_require__(75); /** * A base class that all control directive extend. * It binds a {@link Control} object to a DOM element. * * Used internally by Angular forms. */ var NgControl = (function (_super) { __extends(NgControl, _super); function NgControl() { _super.apply(this, arguments); this.name = null; this.valueAccessor = null; } Object.defineProperty(NgControl.prototype, "validator", { get: function () { return exceptions_1.unimplemented(); }, enumerable: true, configurable: true }); Object.defineProperty(NgControl.prototype, "asyncValidator", { get: function () { return exceptions_1.unimplemented(); }, enumerable: true, configurable: true }); return NgControl; }(abstract_control_directive_1.AbstractControlDirective)); exports.NgControl = NgControl; //# sourceMappingURL=ng_control.js.map /***/ }, /* 27 */ [459, 4, 386], /* 28 */, /* 29 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var collection_1 = __webpack_require__(14); var lang_1 = __webpack_require__(5); var exceptions_1 = __webpack_require__(23); var validators_1 = __webpack_require__(20); var default_value_accessor_1 = __webpack_require__(48); var number_value_accessor_1 = __webpack_require__(83); var checkbox_value_accessor_1 = __webpack_require__(47); var select_control_value_accessor_1 = __webpack_require__(50); var radio_control_value_accessor_1 = __webpack_require__(49); var normalize_validator_1 = __webpack_require__(350); function controlPath(name, parent) { var p = collection_1.ListWrapper.clone(parent.path); p.push(name); return p; } exports.controlPath = controlPath; function setUpControl(control, dir) { if (lang_1.isBlank(control)) _throwError(dir, "Cannot find control"); if (lang_1.isBlank(dir.valueAccessor)) _throwError(dir, "No value accessor for"); control.validator = validators_1.Validators.compose([control.validator, dir.validator]); control.asyncValidator = validators_1.Validators.composeAsync([control.asyncValidator, dir.asyncValidator]); dir.valueAccessor.writeValue(control.value); // view -> model dir.valueAccessor.registerOnChange(function (newValue) { dir.viewToModelUpdate(newValue); control.updateValue(newValue, { emitModelToViewChange: false }); control.markAsDirty(); }); // model -> view control.registerOnChange(function (newValue) { return dir.valueAccessor.writeValue(newValue); }); // touched dir.valueAccessor.registerOnTouched(function () { return control.markAsTouched(); }); } exports.setUpControl = setUpControl; function setUpControlGroup(control, dir) { if (lang_1.isBlank(control)) _throwError(dir, "Cannot find control"); control.validator = validators_1.Validators.compose([control.validator, dir.validator]); control.asyncValidator = validators_1.Validators.composeAsync([control.asyncValidator, dir.asyncValidator]); } exports.setUpControlGroup = setUpControlGroup; function _throwError(dir, message) { var path = dir.path.join(" -> "); throw new exceptions_1.BaseException(message + " '" + path + "'"); } function composeValidators(validators) { return lang_1.isPresent(validators) ? validators_1.Validators.compose(validators.map(normalize_validator_1.normalizeValidator)) : null; } exports.composeValidators = composeValidators; function composeAsyncValidators(validators) { return lang_1.isPresent(validators) ? validators_1.Validators.composeAsync(validators.map(normalize_validator_1.normalizeAsyncValidator)) : null; } exports.composeAsyncValidators = composeAsyncValidators; function isPropertyUpdated(changes, viewModel) { if (!collection_1.StringMapWrapper.contains(changes, "model")) return false; var change = changes["model"]; if (change.isFirstChange()) return true; return !lang_1.looseIdentical(viewModel, change.currentValue); } exports.isPropertyUpdated = isPropertyUpdated; // TODO: vsavkin remove it once https://github.com/angular/angular/issues/3011 is implemented function selectValueAccessor(dir, valueAccessors) { if (lang_1.isBlank(valueAccessors)) return null; var defaultAccessor; var builtinAccessor; var customAccessor; valueAccessors.forEach(function (v) { if (lang_1.hasConstructor(v, default_value_accessor_1.DefaultValueAccessor)) { defaultAccessor = v; } else if (lang_1.hasConstructor(v, checkbox_value_accessor_1.CheckboxControlValueAccessor) || lang_1.hasConstructor(v, number_value_accessor_1.NumberValueAccessor) || lang_1.hasConstructor(v, select_control_value_accessor_1.SelectControlValueAccessor) || lang_1.hasConstructor(v, radio_control_value_accessor_1.RadioControlValueAccessor)) { if (lang_1.isPresent(builtinAccessor)) _throwError(dir, "More than one built-in value accessor matches"); builtinAccessor = v; } else { if (lang_1.isPresent(customAccessor)) _throwError(dir, "More than one custom value accessor matches"); customAccessor = v; } }); if (lang_1.isPresent(customAccessor)) return customAccessor; if (lang_1.isPresent(builtinAccessor)) return builtinAccessor; if (lang_1.isPresent(defaultAccessor)) return defaultAccessor; _throwError(dir, "No valid value accessor for"); return null; } exports.selectValueAccessor = selectValueAccessor; //# sourceMappingURL=shared.js.map /***/ }, /* 30 */, /* 31 */, /* 32 */ /***/ function(module, exports, __webpack_require__) { "use strict"; function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } /** * @module * @description * The `di` module provides dependency injection container services. */ var metadata_1 = __webpack_require__(34); exports.InjectMetadata = metadata_1.InjectMetadata; exports.OptionalMetadata = metadata_1.OptionalMetadata; exports.InjectableMetadata = metadata_1.InjectableMetadata; exports.SelfMetadata = metadata_1.SelfMetadata; exports.HostMetadata = metadata_1.HostMetadata; exports.SkipSelfMetadata = metadata_1.SkipSelfMetadata; exports.DependencyMetadata = metadata_1.DependencyMetadata; // we have to reexport * because Dart and TS export two different sets of types __export(__webpack_require__(33)); var forward_ref_1 = __webpack_require__(61); exports.forwardRef = forward_ref_1.forwardRef; exports.resolveForwardRef = forward_ref_1.resolveForwardRef; var injector_1 = __webpack_require__(103); exports.Injector = injector_1.Injector; var reflective_injector_1 = __webpack_require__(185); exports.ReflectiveInjector = reflective_injector_1.ReflectiveInjector; var provider_1 = __webpack_require__(104); exports.Binding = provider_1.Binding; exports.ProviderBuilder = provider_1.ProviderBuilder; exports.bind = provider_1.bind; exports.Provider = provider_1.Provider; exports.provide = provider_1.provide; var reflective_provider_1 = __webpack_require__(107); exports.ResolvedReflectiveFactory = reflective_provider_1.ResolvedReflectiveFactory; exports.ReflectiveDependency = reflective_provider_1.ReflectiveDependency; var reflective_key_1 = __webpack_require__(106); exports.ReflectiveKey = reflective_key_1.ReflectiveKey; var reflective_exceptions_1 = __webpack_require__(105); exports.NoProviderError = reflective_exceptions_1.NoProviderError; exports.AbstractProviderError = reflective_exceptions_1.AbstractProviderError; exports.CyclicDependencyError = reflective_exceptions_1.CyclicDependencyError; exports.InstantiationError = reflective_exceptions_1.InstantiationError; exports.InvalidProviderError = reflective_exceptions_1.InvalidProviderError; exports.NoAnnotationError = reflective_exceptions_1.NoAnnotationError; exports.OutOfBoundsError = reflective_exceptions_1.OutOfBoundsError; var opaque_token_1 = __webpack_require__(385); exports.OpaqueToken = opaque_token_1.OpaqueToken; //# sourceMappingURL=di.js.map /***/ }, /* 33 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var metadata_1 = __webpack_require__(34); var decorators_1 = __webpack_require__(66); /** * Factory for creating {@link InjectMetadata}. */ exports.Inject = decorators_1.makeParamDecorator(metadata_1.InjectMetadata); /** * Factory for creating {@link OptionalMetadata}. */ exports.Optional = decorators_1.makeParamDecorator(metadata_1.OptionalMetadata); /** * Factory for creating {@link InjectableMetadata}. */ exports.Injectable = decorators_1.makeDecorator(metadata_1.InjectableMetadata); /** * Factory for creating {@link SelfMetadata}. */ exports.Self = decorators_1.makeParamDecorator(metadata_1.SelfMetadata); /** * Factory for creating {@link HostMetadata}. */ exports.Host = decorators_1.makeParamDecorator(metadata_1.HostMetadata); /** * Factory for creating {@link SkipSelfMetadata}. */ exports.SkipSelf = decorators_1.makeParamDecorator(metadata_1.SkipSelfMetadata); //# sourceMappingURL=decorators.js.map /***/ }, /* 34 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var lang_1 = __webpack_require__(4); /** * A parameter metadata that specifies a dependency. * * ### Example ([live demo](http://plnkr.co/edit/6uHYJK?p=preview)) * * ```typescript * class Engine {} * * @Injectable() * class Car { * engine; * constructor(@Inject("MyEngine") engine:Engine) { * this.engine = engine; * } * } * * var injector = Injector.resolveAndCreate([ * provide("MyEngine", {useClass: Engine}), * Car * ]); * * expect(injector.get(Car).engine instanceof Engine).toBe(true); * ``` * * When `@Inject()` is not present, {@link Injector} will use the type annotation of the parameter. * * ### Example * * ```typescript * class Engine {} * * @Injectable() * class Car { * constructor(public engine: Engine) {} //same as constructor(@Inject(Engine) engine:Engine) * } * * var injector = Injector.resolveAndCreate([Engine, Car]); * expect(injector.get(Car).engine instanceof Engine).toBe(true); * ``` * @ts2dart_const */ var InjectMetadata = (function () { function InjectMetadata(token) { this.token = token; } InjectMetadata.prototype.toString = function () { return "@Inject(" + lang_1.stringify(this.token) + ")"; }; return InjectMetadata; }()); exports.InjectMetadata = InjectMetadata; /** * A parameter metadata that marks a dependency as optional. {@link Injector} provides `null` if * the dependency is not found. * * ### Example ([live demo](http://plnkr.co/edit/AsryOm?p=preview)) * * ```typescript * class Engine {} * * @Injectable() * class Car { * engine; * constructor(@Optional() engine:Engine) { * this.engine = engine; * } * } * * var injector = Injector.resolveAndCreate([Car]); * expect(injector.get(Car).engine).toBeNull(); * ``` * @ts2dart_const */ var OptionalMetadata = (function () { function OptionalMetadata() { } OptionalMetadata.prototype.toString = function () { return "@Optional()"; }; return OptionalMetadata; }()); exports.OptionalMetadata = OptionalMetadata; /** * `DependencyMetadata` is used by the framework to extend DI. * This is internal to Angular and should not be used directly. * @ts2dart_const */ var DependencyMetadata = (function () { function DependencyMetadata() { } Object.defineProperty(DependencyMetadata.prototype, "token", { get: function () { return null; }, enumerable: true, configurable: true }); return DependencyMetadata; }()); exports.DependencyMetadata = DependencyMetadata; /** * A marker metadata that marks a class as available to {@link Injector} for creation. * * ### Example ([live demo](http://plnkr.co/edit/Wk4DMQ?p=preview)) * * ```typescript * @Injectable() * class UsefulService {} * * @Injectable() * class NeedsService { * constructor(public service:UsefulService) {} * } * * var injector = Injector.resolveAndCreate([NeedsService, UsefulService]); * expect(injector.get(NeedsService).service instanceof UsefulService).toBe(true); * ``` * {@link Injector} will throw {@link NoAnnotationError} when trying to instantiate a class that * does not have `@Injectable` marker, as shown in the example below. * * ```typescript * class UsefulService {} * * class NeedsService { * constructor(public service:UsefulService) {} * } * * var injector = Injector.resolveAndCreate([NeedsService, UsefulService]); * expect(() => injector.get(NeedsService)).toThrowError(); * ``` * @ts2dart_const */ var InjectableMetadata = (function () { function InjectableMetadata() { } return InjectableMetadata; }()); exports.InjectableMetadata = InjectableMetadata; /** * Specifies that an {@link Injector} should retrieve a dependency only from itself. * * ### Example ([live demo](http://plnkr.co/edit/NeagAg?p=preview)) * * ```typescript * class Dependency { * } * * @Injectable() * class NeedsDependency { * dependency; * constructor(@Self() dependency:Dependency) { * this.dependency = dependency; * } * } * * var inj = Injector.resolveAndCreate([Dependency, NeedsDependency]); * var nd = inj.get(NeedsDependency); * * expect(nd.dependency instanceof Dependency).toBe(true); * * var inj = Injector.resolveAndCreate([Dependency]); * var child = inj.resolveAndCreateChild([NeedsDependency]); * expect(() => child.get(NeedsDependency)).toThrowError(); * ``` * @ts2dart_const */ var SelfMetadata = (function () { function SelfMetadata() { } SelfMetadata.prototype.toString = function () { return "@Self()"; }; return SelfMetadata; }()); exports.SelfMetadata = SelfMetadata; /** * Specifies that the dependency resolution should start from the parent injector. * * ### Example ([live demo](http://plnkr.co/edit/Wchdzb?p=preview)) * * ```typescript * class Dependency { * } * * @Injectable() * class NeedsDependency { * dependency; * constructor(@SkipSelf() dependency:Dependency) { * this.dependency = dependency; * } * } * * var parent = Injector.resolveAndCreate([Dependency]); * var child = parent.resolveAndCreateChild([NeedsDependency]); * expect(child.get(NeedsDependency).dependency instanceof Depedency).toBe(true); * * var inj = Injector.resolveAndCreate([Dependency, NeedsDependency]); * expect(() => inj.get(NeedsDependency)).toThrowError(); * ``` * @ts2dart_const */ var SkipSelfMetadata = (function () { function SkipSelfMetadata() { } SkipSelfMetadata.prototype.toString = function () { return "@SkipSelf()"; }; return SkipSelfMetadata; }()); exports.SkipSelfMetadata = SkipSelfMetadata; /** * Specifies that an injector should retrieve a dependency from any injector until reaching the * closest host. * * In Angular, a component element is automatically declared as a host for all the injectors in * its view. * * ### Example ([live demo](http://plnkr.co/edit/GX79pV?p=preview)) * * In the following example `App` contains `ParentCmp`, which contains `ChildDirective`. * So `ParentCmp` is the host of `ChildDirective`. * * `ChildDirective` depends on two services: `HostService` and `OtherService`. * `HostService` is defined at `ParentCmp`, and `OtherService` is defined at `App`. * *```typescript * class OtherService {} * class HostService {} * * @Directive({ * selector: 'child-directive' * }) * class ChildDirective { * constructor(@Optional() @Host() os:OtherService, @Optional() @Host() hs:HostService){ * console.log("os is null", os); * console.log("hs is NOT null", hs); * } * } * * @Component({ * selector: 'parent-cmp', * providers: [HostService], * template: ` * Dir: * `, * directives: [ChildDirective] * }) * class ParentCmp { * } * * @Component({ * selector: 'app', * providers: [OtherService], * template: ` * Parent: * `, * directives: [ParentCmp] * }) * class App { * } * * bootstrap(App); *``` * @ts2dart_const */ var HostMetadata = (function () { function HostMetadata() { } HostMetadata.prototype.toString = function () { return "@Host()"; }; return HostMetadata; }()); exports.HostMetadata = HostMetadata; //# sourceMappingURL=metadata.js.map /***/ }, /* 35 */, /* 36 */, /* 37 */ /***/ function(module, exports, __webpack_require__) { "use strict"; 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__(42); var Subscriber_1 = __webpack_require__(343); var Subscription_1 = __webpack_require__(134); var SubjectSubscription_1 = __webpack_require__(445); var rxSubscriber_1 = __webpack_require__(137); var throwError_1 = __webpack_require__(451); var ObjectUnsubscribedError_1 = __webpack_require__(447); /** * @class Subject */ var Subject = (function (_super) { __extends(Subject, _super); function Subject(destination, source) { _super.call(this); this.destination = destination; this.source = source; this.observers = []; this.isUnsubscribed = false; this.isStopped = false; this.hasErrored = false; this.dispatching = false; this.hasCompleted = false; this.source = source; } Subject.prototype.lift = function (operator) { var subject = new Subject(this.destination || this, this); subject.operator = operator; return subject; }; Subject.prototype.add = function (subscription) { return Subscription_1.Subscription.prototype.add.call(this, subscription); }; Subject.prototype.remove = function (subscription) { Subscription_1.Subscription.prototype.remove.call(this, subscription); }; Subject.prototype.unsubscribe = function () { Subscription_1.Subscription.prototype.unsubscribe.call(this); }; Subject.prototype._subscribe = function (subscriber) { if (this.source) { return this.source.subscribe(subscriber); } else { if (subscriber.isUnsubscribed) { return; } else if (this.hasErrored) { return subscriber.error(this.errorValue); } else if (this.hasCompleted) { return subscriber.complete(); } this.throwIfUnsubscribed(); var subscription = new SubjectSubscription_1.SubjectSubscription(this, subscriber); this.observers.push(subscriber); return subscription; } }; Subject.prototype._unsubscribe = function () { this.source = null; this.isStopped = true; this.observers = null; this.destination = null; }; Subject.prototype.next = function (value) { this.throwIfUnsubscribed(); if (this.isStopped) { return; } this.dispatching = true; this._next(value); this.dispatching = false; if (this.hasErrored) { this._error(this.errorValue); } else if (this.hasCompleted) { this._complete(); } }; Subject.prototype.error = function (err) { this.throwIfUnsubscribed(); if (this.isStopped) { return; } this.isStopped = true; this.hasErrored = true; this.errorValue = err; if (this.dispatching) { return; } this._error(err); }; Subject.prototype.complete = function () { this.throwIfUnsubscribed(); if (this.isStopped) { return; } this.isStopped = true; this.hasCompleted = true; if (this.dispatching) { return; } this._complete(); }; Subject.prototype.asObservable = function () { var observable = new SubjectObservable(this); return observable; }; Subject.prototype._next = function (value) { if (this.destination) { this.destination.next(value); } else { this._finalNext(value); } }; Subject.prototype._finalNext = function (value) { var index = -1; var observers = this.observers.slice(0); var len = observers.length; while (++index < len) { observers[index].next(value); } }; Subject.prototype._error = function (err) { if (this.destination) { this.destination.error(err); } else { this._finalError(err); } }; Subject.prototype._finalError = function (err) { var index = -1; var observers = this.observers; // optimization to block our SubjectSubscriptions from // splicing themselves out of the observers list one by one. this.observers = null; this.isUnsubscribed = true; if (observers) { var len = observers.length; while (++index < len) { observers[index].error(err); } } this.isUnsubscribed = false; this.unsubscribe(); }; Subject.prototype._complete = function () { if (this.destination) { this.destination.complete(); } else { this._finalComplete(); } }; Subject.prototype._finalComplete = function () { var index = -1; var observers = this.observers; // optimization to block our SubjectSubscriptions from // splicing themselves out of the observers list one by one. this.observers = null; this.isUnsubscribed = true; if (observers) { var len = observers.length; while (++index < len) { observers[index].complete(); } } this.isUnsubscribed = false; this.unsubscribe(); }; Subject.prototype.throwIfUnsubscribed = function () { if (this.isUnsubscribed) { throwError_1.throwError(new ObjectUnsubscribedError_1.ObjectUnsubscribedError()); } }; Subject.prototype[rxSubscriber_1.$$rxSubscriber] = function () { return new Subscriber_1.Subscriber(this); }; Subject.create = function (destination, source) { return new Subject(destination, source); }; return Subject; }(Observable_1.Observable)); exports.Subject = Subject; /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var SubjectObservable = (function (_super) { __extends(SubjectObservable, _super); function SubjectObservable(source) { _super.call(this); this.source = source; } return SubjectObservable; }(Observable_1.Observable)); //# sourceMappingURL=Subject.js.map /***/ }, /* 38 */ /***/ function(module, exports, __webpack_require__) { "use strict"; 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 abstract_control_directive_1 = __webpack_require__(75); /** * A directive that contains multiple {@link NgControl}s. * * Only used by the forms module. */ var ControlContainer = (function (_super) { __extends(ControlContainer, _super); function ControlContainer() { _super.apply(this, arguments); } Object.defineProperty(ControlContainer.prototype, "formDirective", { /** * Get the form to which this container belongs. */ get: function () { return null; }, enumerable: true, configurable: true }); Object.defineProperty(ControlContainer.prototype, "path", { /** * Get the path to this container. */ get: function () { return null; }, enumerable: true, configurable: true }); return ControlContainer; }(abstract_control_directive_1.AbstractControlDirective)); exports.ControlContainer = ControlContainer; //# sourceMappingURL=control_container.js.map /***/ }, /* 39 */, /* 40 */ /***/ function(module, exports, __webpack_require__) { "use strict"; 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 lang_1 = __webpack_require__(4); var exceptions_1 = __webpack_require__(9); var async_1 = __webpack_require__(27); var reflection_1 = __webpack_require__(65); var component_factory_1 = __webpack_require__(188); var decorators_1 = __webpack_require__(33); /** * Low-level service for loading {@link ComponentFactory}s, which * can later be used to create and render a Component instance. */ var ComponentResolver = (function () { function ComponentResolver() { } return ComponentResolver; }()); exports.ComponentResolver = ComponentResolver; function _isComponentFactory(type) { return type instanceof component_factory_1.ComponentFactory; } var ReflectorComponentResolver = (function (_super) { __extends(ReflectorComponentResolver, _super); function ReflectorComponentResolver() { _super.apply(this, arguments); } ReflectorComponentResolver.prototype.resolveComponent = function (componentType) { var metadatas = reflection_1.reflector.annotations(componentType); var componentFactory = metadatas.find(_isComponentFactory); if (lang_1.isBlank(componentFactory)) { throw new exceptions_1.BaseException("No precompiled component " + lang_1.stringify(componentType) + " found"); } return async_1.PromiseWrapper.resolve(componentFactory); }; ReflectorComponentResolver.prototype.clearCache = function () { }; ReflectorComponentResolver.decorators = [ { type: decorators_1.Injectable }, ]; return ReflectorComponentResolver; }(ComponentResolver)); exports.ReflectorComponentResolver = ReflectorComponentResolver; //# sourceMappingURL=component_resolver.js.map /***/ }, /* 41 */, /* 42 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var root_1 = __webpack_require__(43); var observable_1 = __webpack_require__(446); var toSubscriber_1 = __webpack_require__(452); /** * A representation of any set of values over any amount of time. This the most basic building block * of RxJS. * * @class Observable */ var Observable = (function () { /** * @constructor * @param {Function} subscribe the function that is called when the Observable is * initially subscribed to. This function is given a Subscriber, to which new values * can be `next`ed, or an `error` method can be called to raise an error, or * `complete` can be called to notify of a successful completion. */ function Observable(subscribe) { this._isScalar = false; if (subscribe) { this._subscribe = subscribe; } } /** * Creates a new Observable, with this Observable as the source, and the passed * operator defined as the new observable's operator. * @method lift * @param {Operator} operator the operator defining the operation to take on the observable * @return {Observable} a new observable with the Operator applied */ Observable.prototype.lift = function (operator) { var observable = new Observable(); observable.source = this; observable.operator = operator; return observable; }; /** * Registers handlers for handling emitted values, error and completions from the observable, and * executes the observable's subscriber function, which will take action to set up the underlying data stream * @method subscribe * @param {PartialObserver|Function} observerOrNext (optional) either an observer defining all functions to be called, * or the first of three possible handlers, which is the handler for each value emitted from the observable. * @param {Function} error (optional) a handler for a terminal event resulting from an error. If no error handler is provided, * the error will be thrown as unhandled * @param {Function} complete (optional) a handler for a terminal event resulting from successful completion. * @return {ISubscription} a subscription reference to the registered handlers */ Observable.prototype.subscribe = function (observerOrNext, error, complete) { var operator = this.operator; var sink = toSubscriber_1.toSubscriber(observerOrNext, error, complete); sink.add(operator ? operator.call(sink, this) : this._subscribe(sink)); if (sink.syncErrorThrowable) { sink.syncErrorThrowable = false; if (sink.syncErrorThrown) { throw sink.syncErrorValue; } } return sink; }; /** * @method forEach * @param {Function} next a handler for each value emitted by the observable * @param {PromiseConstructor} [PromiseCtor] a constructor function used to instantiate the Promise * @return {Promise} a promise that either resolves on observable completion or * rejects with the handled error */ Observable.prototype.forEach = function (next, PromiseCtor) { var _this = this; if (!PromiseCtor) { if (root_1.root.Rx && root_1.root.Rx.config && root_1.root.Rx.config.Promise) { PromiseCtor = root_1.root.Rx.config.Promise; } else if (root_1.root.Promise) { PromiseCtor = root_1.root.Promise; } } if (!PromiseCtor) { throw new Error('no Promise impl found'); } return new PromiseCtor(function (resolve, reject) { var subscription = _this.subscribe(function (value) { if (subscription) { // if there is a subscription, then we can surmise // the next handling is asynchronous. Any errors thrown // need to be rejected explicitly and unsubscribe must be // called manually try { next(value); } catch (err) { reject(err); subscription.unsubscribe(); } } else { // if there is NO subscription, then we're getting a nexted // value synchronously during subscription. We can just call it. // If it errors, Observable's `subscribe` imple will ensure the // unsubscription logic is called, then synchronously rethrow the error. // After that, Promise will trap the error and send it // down the rejection path. next(value); } }, reject, resolve); }); }; Observable.prototype._subscribe = function (subscriber) { return this.source.subscribe(subscriber); }; /** * An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable * @method Symbol.observable * @return {Observable} this instance of the observable */ Observable.prototype[observable_1.$$observable] = function () { return this; }; // HACK: Since TypeScript inherits static properties too, we have to // fight against TypeScript here so Subject can have a different static create signature /** * Creates a new cold Observable by calling the Observable constructor * @static true * @owner Observable * @method create * @param {Function} subscribe? the subscriber function to be passed to the Observable constructor * @return {Observable} a new cold observable */ Observable.create = function (subscribe) { return new Observable(subscribe); }; return Observable; }()); exports.Observable = Observable; //# sourceMappingURL=Observable.js.map /***/ }, /* 43 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module, global) {"use strict"; var objectTypes = { 'boolean': false, 'function': true, 'object': true, 'number': false, 'string': false, 'undefined': false }; exports.root = (objectTypes[typeof self] && self) || (objectTypes[typeof window] && window); /* tslint:disable:no-unused-variable */ var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; var freeGlobal = objectTypes[typeof global] && global; if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) { exports.root = freeGlobal; } //# sourceMappingURL=root.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(141)(module), (function() { return this; }()))) /***/ }, /* 44 */, /* 45 */, /* 46 */, /* 47 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var core_1 = __webpack_require__(1); var control_value_accessor_1 = __webpack_require__(19); exports.CHECKBOX_VALUE_ACCESSOR = { provide: control_value_accessor_1.NG_VALUE_ACCESSOR, useExisting: core_1.forwardRef(function () { return CheckboxControlValueAccessor; }), multi: true }; var CheckboxControlValueAccessor = (function () { function CheckboxControlValueAccessor(_renderer, _elementRef) { this._renderer = _renderer; this._elementRef = _elementRef; this.onChange = function (_) { }; this.onTouched = function () { }; } CheckboxControlValueAccessor.prototype.writeValue = function (value) { this._renderer.setElementProperty(this._elementRef.nativeElement, 'checked', value); }; CheckboxControlValueAccessor.prototype.registerOnChange = function (fn) { this.onChange = fn; }; CheckboxControlValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; }; CheckboxControlValueAccessor.decorators = [ { type: core_1.Directive, args: [{ selector: 'input[type=checkbox][ngControl],input[type=checkbox][ngFormControl],input[type=checkbox][ngModel]', host: { '(change)': 'onChange($event.target.checked)', '(blur)': 'onTouched()' }, providers: [exports.CHECKBOX_VALUE_ACCESSOR] },] }, ]; CheckboxControlValueAccessor.ctorParameters = [ { type: core_1.Renderer, }, { type: core_1.ElementRef, }, ]; return CheckboxControlValueAccessor; }()); exports.CheckboxControlValueAccessor = CheckboxControlValueAccessor; //# sourceMappingURL=checkbox_value_accessor.js.map /***/ }, /* 48 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var core_1 = __webpack_require__(1); var lang_1 = __webpack_require__(5); var control_value_accessor_1 = __webpack_require__(19); exports.DEFAULT_VALUE_ACCESSOR = /* @ts2dart_Provider */ { provide: control_value_accessor_1.NG_VALUE_ACCESSOR, useExisting: core_1.forwardRef(function () { return DefaultValueAccessor; }), multi: true }; var DefaultValueAccessor = (function () { function DefaultValueAccessor(_renderer, _elementRef) { this._renderer = _renderer; this._elementRef = _elementRef; this.onChange = function (_) { }; this.onTouched = function () { }; } DefaultValueAccessor.prototype.writeValue = function (value) { var normalizedValue = lang_1.isBlank(value) ? '' : value; this._renderer.setElementProperty(this._elementRef.nativeElement, 'value', normalizedValue); }; DefaultValueAccessor.prototype.registerOnChange = function (fn) { this.onChange = fn; }; DefaultValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; }; DefaultValueAccessor.decorators = [ { type: core_1.Directive, args: [{ selector: 'input:not([type=checkbox])[ngControl],textarea[ngControl],input:not([type=checkbox])[ngFormControl],textarea[ngFormControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]', // TODO: vsavkin replace the above selector with the one below it once // https://github.com/angular/angular/issues/3011 is implemented // selector: '[ngControl],[ngModel],[ngFormControl]', host: { '(input)': 'onChange($event.target.value)', '(blur)': 'onTouched()' }, bindings: [exports.DEFAULT_VALUE_ACCESSOR] },] }, ]; DefaultValueAccessor.ctorParameters = [ { type: core_1.Renderer, }, { type: core_1.ElementRef, }, ]; return DefaultValueAccessor; }()); exports.DefaultValueAccessor = DefaultValueAccessor; //# sourceMappingURL=default_value_accessor.js.map /***/ }, /* 49 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var core_1 = __webpack_require__(1); var lang_1 = __webpack_require__(5); var collection_1 = __webpack_require__(14); var control_value_accessor_1 = __webpack_require__(19); var ng_control_1 = __webpack_require__(26); exports.RADIO_VALUE_ACCESSOR = { provide: control_value_accessor_1.NG_VALUE_ACCESSOR, useExisting: core_1.forwardRef(function () { return RadioControlValueAccessor; }), multi: true }; var RadioControlRegistry = (function () { function RadioControlRegistry() { this._accessors = []; } RadioControlRegistry.prototype.add = function (control, accessor) { this._accessors.push([control, accessor]); }; RadioControlRegistry.prototype.remove = function (accessor) { var indexToRemove = -1; for (var i = 0; i < this._accessors.length; ++i) { if (this._accessors[i][1] === accessor) { indexToRemove = i; } } collection_1.ListWrapper.removeAt(this._accessors, indexToRemove); }; RadioControlRegistry.prototype.select = function (accessor) { this._accessors.forEach(function (c) { if (c[0].control.root === accessor._control.control.root && c[1] !== accessor) { c[1].fireUncheck(); } }); }; RadioControlRegistry.decorators = [ { type: core_1.Injectable }, ]; return RadioControlRegistry; }()); exports.RadioControlRegistry = RadioControlRegistry; /** * The value provided by the forms API for radio buttons. */ var RadioButtonState = (function () { function RadioButtonState(checked, value) { this.checked = checked; this.value = value; } return RadioButtonState; }()); exports.RadioButtonState = RadioButtonState; var RadioControlValueAccessor = (function () { function RadioControlValueAccessor(_renderer, _elementRef, _registry, _injector) { this._renderer = _renderer; this._elementRef = _elementRef; this._registry = _registry; this._injector = _injector; this.onChange = function () { }; this.onTouched = function () { }; } RadioControlValueAccessor.prototype.ngOnInit = function () { this._control = this._injector.get(ng_control_1.NgControl); this._registry.add(this._control, this); }; RadioControlValueAccessor.prototype.ngOnDestroy = function () { this._registry.remove(this); }; RadioControlValueAccessor.prototype.writeValue = function (value) { this._state = value; if (lang_1.isPresent(value) && value.checked) { this._renderer.setElementProperty(this._elementRef.nativeElement, 'checked', true); } }; RadioControlValueAccessor.prototype.registerOnChange = function (fn) { var _this = this; this._fn = fn; this.onChange = function () { fn(new RadioButtonState(true, _this._state.value)); _this._registry.select(_this); }; }; RadioControlValueAccessor.prototype.fireUncheck = function () { this._fn(new RadioButtonState(false, this._state.value)); }; RadioControlValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; }; RadioControlValueAccessor.decorators = [ { type: core_1.Directive, args: [{ selector: 'input[type=radio][ngControl],input[type=radio][ngFormControl],input[type=radio][ngModel]', host: { '(change)': 'onChange()', '(blur)': 'onTouched()' }, providers: [exports.RADIO_VALUE_ACCESSOR] },] }, ]; RadioControlValueAccessor.ctorParameters = [ { type: core_1.Renderer, }, { type: core_1.ElementRef, }, { type: RadioControlRegistry, }, { type: core_1.Injector, }, ]; RadioControlValueAccessor.propDecorators = { 'name': [{ type: core_1.Input },], }; return RadioControlValueAccessor; }()); exports.RadioControlValueAccessor = RadioControlValueAccessor; //# sourceMappingURL=radio_control_value_accessor.js.map /***/ }, /* 50 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var core_1 = __webpack_require__(1); var lang_1 = __webpack_require__(5); var collection_1 = __webpack_require__(14); var control_value_accessor_1 = __webpack_require__(19); exports.SELECT_VALUE_ACCESSOR = { provide: control_value_accessor_1.NG_VALUE_ACCESSOR, useExisting: core_1.forwardRef(function () { return SelectControlValueAccessor; }), multi: true }; function _buildValueString(id, value) { if (lang_1.isBlank(id)) return "" + value; if (!lang_1.isPrimitive(value)) value = "Object"; return lang_1.StringWrapper.slice(id + ": " + value, 0, 50); } function _extractId(valueString) { return valueString.split(":")[0]; } var SelectControlValueAccessor = (function () { function SelectControlValueAccessor(_renderer, _elementRef) { this._renderer = _renderer; this._elementRef = _elementRef; /** @internal */ this._optionMap = new Map(); /** @internal */ this._idCounter = 0; this.onChange = function (_) { }; this.onTouched = function () { }; } SelectControlValueAccessor.prototype.writeValue = function (value) { this.value = value; var valueString = _buildValueString(this._getOptionId(value), value); this._renderer.setElementProperty(this._elementRef.nativeElement, 'value', valueString); }; SelectControlValueAccessor.prototype.registerOnChange = function (fn) { var _this = this; this.onChange = function (valueString) { fn(_this._getOptionValue(valueString)); }; }; SelectControlValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; }; /** @internal */ SelectControlValueAccessor.prototype._registerOption = function () { return (this._idCounter++).toString(); }; /** @internal */ SelectControlValueAccessor.prototype._getOptionId = function (value) { for (var _i = 0, _a = collection_1.MapWrapper.keys(this._optionMap); _i < _a.length; _i++) { var id = _a[_i]; if (lang_1.looseIdentical(this._optionMap.get(id), value)) return id; } return null; }; /** @internal */ SelectControlValueAccessor.prototype._getOptionValue = function (valueString) { var value = this._optionMap.get(_extractId(valueString)); return lang_1.isPresent(value) ? value : valueString; }; SelectControlValueAccessor.decorators = [ { type: core_1.Directive, args: [{ selector: 'select[ngControl],select[ngFormControl],select[ngModel]', host: { '(change)': 'onChange($event.target.value)', '(blur)': 'onTouched()' }, providers: [exports.SELECT_VALUE_ACCESSOR] },] }, ]; SelectControlValueAccessor.ctorParameters = [ { type: core_1.Renderer, }, { type: core_1.ElementRef, }, ]; return SelectControlValueAccessor; }()); exports.SelectControlValueAccessor = SelectControlValueAccessor; var NgSelectOption = (function () { function NgSelectOption(_element, _renderer, _select) { this._element = _element; this._renderer = _renderer; this._select = _select; if (lang_1.isPresent(this._select)) this.id = this._select._registerOption(); } Object.defineProperty(NgSelectOption.prototype, "ngValue", { set: function (value) { if (this._select == null) return; this._select._optionMap.set(this.id, value); this._setElementValue(_buildValueString(this.id, value)); this._select.writeValue(this._select.value); }, enumerable: true, configurable: true }); Object.defineProperty(NgSelectOption.prototype, "value", { set: function (value) { this._setElementValue(value); if (lang_1.isPresent(this._select)) this._select.writeValue(this._select.value); }, enumerable: true, configurable: true }); /** @internal */ NgSelectOption.prototype._setElementValue = function (value) { this._renderer.setElementProperty(this._element.nativeElement, 'value', value); }; NgSelectOption.prototype.ngOnDestroy = function () { if (lang_1.isPresent(this._select)) { this._select._optionMap.delete(this.id); this._select.writeValue(this._select.value); } }; NgSelectOption.decorators = [ { type: core_1.Directive, args: [{ selector: 'option' },] }, ]; NgSelectOption.ctorParameters = [ { type: core_1.ElementRef, }, { type: core_1.Renderer, }, { type: SelectControlValueAccessor, decorators: [{ type: core_1.Optional }, { type: core_1.Host },] }, ]; NgSelectOption.propDecorators = { 'ngValue': [{ type: core_1.Input, args: ['ngValue',] },], 'value': [{ type: core_1.Input, args: ['value',] },], }; return NgSelectOption; }()); exports.NgSelectOption = NgSelectOption; //# sourceMappingURL=select_control_value_accessor.js.map /***/ }, /* 51 */ /***/ function(module, exports, __webpack_require__) { "use strict"; 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 lang_1 = __webpack_require__(5); var async_1 = __webpack_require__(18); var promise_1 = __webpack_require__(74); var collection_1 = __webpack_require__(14); /** * Indicates that a Control is valid, i.e. that no errors exist in the input value. */ exports.VALID = "VALID"; /** * Indicates that a Control is invalid, i.e. that an error exists in the input value. */ exports.INVALID = "INVALID"; /** * Indicates that a Control is pending, i.e. that async validation is occurring and * errors are not yet available for the input value. */ exports.PENDING = "PENDING"; function isControl(control) { return control instanceof AbstractControl; } exports.isControl = isControl; function _find(control, path) { if (lang_1.isBlank(path)) return null; if (!(path instanceof Array)) { path = path.split("/"); } if (path instanceof Array && collection_1.ListWrapper.isEmpty(path)) return null; return path .reduce(function (v, name) { if (v instanceof ControlGroup) { return lang_1.isPresent(v.controls[name]) ? v.controls[name] : null; } else if (v instanceof ControlArray) { var index = name; return lang_1.isPresent(v.at(index)) ? v.at(index) : null; } else { return null; } }, control); } function toObservable(r) { return promise_1.PromiseWrapper.isPromise(r) ? async_1.ObservableWrapper.fromPromise(r) : r; } /** * */ var AbstractControl = (function () { function AbstractControl(validator, asyncValidator) { this.validator = validator; this.asyncValidator = asyncValidator; this._pristine = true; this._touched = false; } Object.defineProperty(AbstractControl.prototype, "value", { get: function () { return this._value; }, enumerable: true, configurable: true }); Object.defineProperty(AbstractControl.prototype, "status", { get: function () { return this._status; }, enumerable: true, configurable: true }); Object.defineProperty(AbstractControl.prototype, "valid", { get: function () { return this._status === exports.VALID; }, enumerable: true, configurable: true }); Object.defineProperty(AbstractControl.prototype, "errors", { /** * Returns the errors of this control. */ get: function () { return this._errors; }, enumerable: true, configurable: true }); Object.defineProperty(AbstractControl.prototype, "pristine", { get: function () { return this._pristine; }, enumerable: true, configurable: true }); Object.defineProperty(AbstractControl.prototype, "dirty", { get: function () { return !this.pristine; }, enumerable: true, configurable: true }); Object.defineProperty(AbstractControl.prototype, "touched", { get: function () { return this._touched; }, enumerable: true, configurable: true }); Object.defineProperty(AbstractControl.prototype, "untouched", { get: function () { return !this._touched; }, enumerable: true, configurable: true }); Object.defineProperty(AbstractControl.prototype, "valueChanges", { get: function () { return this._valueChanges; }, enumerable: true, configurable: true }); Object.defineProperty(AbstractControl.prototype, "statusChanges", { get: function () { return this._statusChanges; }, enumerable: true, configurable: true }); Object.defineProperty(AbstractControl.prototype, "pending", { get: function () { return this._status == exports.PENDING; }, enumerable: true, configurable: true }); AbstractControl.prototype.markAsTouched = function () { this._touched = true; }; AbstractControl.prototype.markAsDirty = function (_a) { var onlySelf = (_a === void 0 ? {} : _a).onlySelf; onlySelf = lang_1.normalizeBool(onlySelf); this._pristine = false; if (lang_1.isPresent(this._parent) && !onlySelf) { this._parent.markAsDirty({ onlySelf: onlySelf }); } }; AbstractControl.prototype.markAsPending = function (_a) { var onlySelf = (_a === void 0 ? {} : _a).onlySelf; onlySelf = lang_1.normalizeBool(onlySelf); this._status = exports.PENDING; if (lang_1.isPresent(this._parent) && !onlySelf) { this._parent.markAsPending({ onlySelf: onlySelf }); } }; AbstractControl.prototype.setParent = function (parent) { this._parent = parent; }; AbstractControl.prototype.updateValueAndValidity = function (_a) { var _b = _a === void 0 ? {} : _a, onlySelf = _b.onlySelf, emitEvent = _b.emitEvent; onlySelf = lang_1.normalizeBool(onlySelf); emitEvent = lang_1.isPresent(emitEvent) ? emitEvent : true; this._updateValue(); this._errors = this._runValidator(); this._status = this._calculateStatus(); if (this._status == exports.VALID || this._status == exports.PENDING) { this._runAsyncValidator(emitEvent); } if (emitEvent) { async_1.ObservableWrapper.callEmit(this._valueChanges, this._value); async_1.ObservableWrapper.callEmit(this._statusChanges, this._status); } if (lang_1.isPresent(this._parent) && !onlySelf) { this._parent.updateValueAndValidity({ onlySelf: onlySelf, emitEvent: emitEvent }); } }; AbstractControl.prototype._runValidator = function () { return lang_1.isPresent(this.validator) ? this.validator(this) : null; }; AbstractControl.prototype._runAsyncValidator = function (emitEvent) { var _this = this; if (lang_1.isPresent(this.asyncValidator)) { this._status = exports.PENDING; this._cancelExistingSubscription(); var obs = toObservable(this.asyncValidator(this)); this._asyncValidationSubscription = async_1.ObservableWrapper.subscribe(obs, function (res) { return _this.setErrors(res, { emitEvent: emitEvent }); }); } }; AbstractControl.prototype._cancelExistingSubscription = function () { if (lang_1.isPresent(this._asyncValidationSubscription)) { async_1.ObservableWrapper.dispose(this._asyncValidationSubscription); } }; /** * Sets errors on a control. * * This is used when validations are run not automatically, but manually by the user. * * Calling `setErrors` will also update the validity of the parent control. * * ## Usage * * ``` * var login = new Control("someLogin"); * login.setErrors({ * "notUnique": true * }); * * expect(login.valid).toEqual(false); * expect(login.errors).toEqual({"notUnique": true}); * * login.updateValue("someOtherLogin"); * * expect(login.valid).toEqual(true); * ``` */ AbstractControl.prototype.setErrors = function (errors, _a) { var emitEvent = (_a === void 0 ? {} : _a).emitEvent; emitEvent = lang_1.isPresent(emitEvent) ? emitEvent : true; this._errors = errors; this._status = this._calculateStatus(); if (emitEvent) { async_1.ObservableWrapper.callEmit(this._statusChanges, this._status); } if (lang_1.isPresent(this._parent)) { this._parent._updateControlsErrors(); } }; AbstractControl.prototype.find = function (path) { return _find(this, path); }; AbstractControl.prototype.getError = function (errorCode, path) { if (path === void 0) { path = null; } var control = lang_1.isPresent(path) && !collection_1.ListWrapper.isEmpty(path) ? this.find(path) : this; if (lang_1.isPresent(control) && lang_1.isPresent(control._errors)) { return collection_1.StringMapWrapper.get(control._errors, errorCode); } else { return null; } }; AbstractControl.prototype.hasError = function (errorCode, path) { if (path === void 0) { path = null; } return lang_1.isPresent(this.getError(errorCode, path)); }; Object.defineProperty(AbstractControl.prototype, "root", { get: function () { var x = this; while (lang_1.isPresent(x._parent)) { x = x._parent; } return x; }, enumerable: true, configurable: true }); /** @internal */ AbstractControl.prototype._updateControlsErrors = function () { this._status = this._calculateStatus(); if (lang_1.isPresent(this._parent)) { this._parent._updateControlsErrors(); } }; /** @internal */ AbstractControl.prototype._initObservables = function () { this._valueChanges = new async_1.EventEmitter(); this._statusChanges = new async_1.EventEmitter(); }; AbstractControl.prototype._calculateStatus = function () { if (lang_1.isPresent(this._errors)) return exports.INVALID; if (this._anyControlsHaveStatus(exports.PENDING)) return exports.PENDING; if (this._anyControlsHaveStatus(exports.INVALID)) return exports.INVALID; return exports.VALID; }; return AbstractControl; }()); exports.AbstractControl = AbstractControl; /** * Defines a part of a form that cannot be divided into other controls. `Control`s have values and * validation state, which is determined by an optional validation function. * * `Control` is one of the three fundamental building blocks used to define forms in Angular, along * with {@link ControlGroup} and {@link ControlArray}. * * ## Usage * * By default, a `Control` is created for every `` or other form component. * With {@link NgFormControl} or {@link NgFormModel} an existing {@link Control} can be * bound to a DOM element instead. This `Control` can be configured with a custom * validation function. * * ### Example ([live demo](http://plnkr.co/edit/23DESOpbNnBpBHZt1BR4?p=preview)) */ var Control = (function (_super) { __extends(Control, _super); function Control(value, validator, asyncValidator) { if (value === void 0) { value = null; } if (validator === void 0) { validator = null; } if (asyncValidator === void 0) { asyncValidator = null; } _super.call(this, validator, asyncValidator); this._value = value; this.updateValueAndValidity({ onlySelf: true, emitEvent: false }); this._initObservables(); } /** * Set the value of the control to `value`. * * If `onlySelf` is `true`, this change will only affect the validation of this `Control` * and not its parent component. If `emitEvent` is `true`, this change will cause a * `valueChanges` event on the `Control` to be emitted. Both of these options default to * `false`. * * If `emitModelToViewChange` is `true`, the view will be notified about the new value * via an `onChange` event. This is the default behavior if `emitModelToViewChange` is not * specified. */ Control.prototype.updateValue = function (value, _a) { var _b = _a === void 0 ? {} : _a, onlySelf = _b.onlySelf, emitEvent = _b.emitEvent, emitModelToViewChange = _b.emitModelToViewChange; emitModelToViewChange = lang_1.isPresent(emitModelToViewChange) ? emitModelToViewChange : true; this._value = value; if (lang_1.isPresent(this._onChange) && emitModelToViewChange) this._onChange(this._value); this.updateValueAndValidity({ onlySelf: onlySelf, emitEvent: emitEvent }); }; /** * @internal */ Control.prototype._updateValue = function () { }; /** * @internal */ Control.prototype._anyControlsHaveStatus = function (status) { return false; }; /** * Register a listener for change events. */ Control.prototype.registerOnChange = function (fn) { this._onChange = fn; }; return Control; }(AbstractControl)); exports.Control = Control; /** * Defines a part of a form, of fixed length, that can contain other controls. * * A `ControlGroup` aggregates the values of each {@link Control} in the group. * The status of a `ControlGroup` depends on the status of its children. * If one of the controls in a group is invalid, the entire group is invalid. * Similarly, if a control changes its value, the entire group changes as well. * * `ControlGroup` is one of the three fundamental building blocks used to define forms in Angular, * along with {@link Control} and {@link ControlArray}. {@link ControlArray} can also contain other * controls, but is of variable length. * * ### Example ([live demo](http://plnkr.co/edit/23DESOpbNnBpBHZt1BR4?p=preview)) */ var ControlGroup = (function (_super) { __extends(ControlGroup, _super); function ControlGroup(controls, optionals, validator, asyncValidator) { if (optionals === void 0) { optionals = null; } if (validator === void 0) { validator = null; } if (asyncValidator === void 0) { asyncValidator = null; } _super.call(this, validator, asyncValidator); this.controls = controls; this._optionals = lang_1.isPresent(optionals) ? optionals : {}; this._initObservables(); this._setParentForControls(); this.updateValueAndValidity({ onlySelf: true, emitEvent: false }); } /** * Add a control to this group. */ ControlGroup.prototype.addControl = function (name, control) { this.controls[name] = control; control.setParent(this); }; /** * Remove a control from this group. */ ControlGroup.prototype.removeControl = function (name) { collection_1.StringMapWrapper.delete(this.controls, name); }; /** * Mark the named control as non-optional. */ ControlGroup.prototype.include = function (controlName) { collection_1.StringMapWrapper.set(this._optionals, controlName, true); this.updateValueAndValidity(); }; /** * Mark the named control as optional. */ ControlGroup.prototype.exclude = function (controlName) { collection_1.StringMapWrapper.set(this._optionals, controlName, false); this.updateValueAndValidity(); }; /** * Check whether there is a control with the given name in the group. */ ControlGroup.prototype.contains = function (controlName) { var c = collection_1.StringMapWrapper.contains(this.controls, controlName); return c && this._included(controlName); }; /** @internal */ ControlGroup.prototype._setParentForControls = function () { var _this = this; collection_1.StringMapWrapper.forEach(this.controls, function (control, name) { control.setParent(_this); }); }; /** @internal */ ControlGroup.prototype._updateValue = function () { this._value = this._reduceValue(); }; /** @internal */ ControlGroup.prototype._anyControlsHaveStatus = function (status) { var _this = this; var res = false; collection_1.StringMapWrapper.forEach(this.controls, function (control, name) { res = res || (_this.contains(name) && control.status == status); }); return res; }; /** @internal */ ControlGroup.prototype._reduceValue = function () { return this._reduceChildren({}, function (acc, control, name) { acc[name] = control.value; return acc; }); }; /** @internal */ ControlGroup.prototype._reduceChildren = function (initValue, fn) { var _this = this; var res = initValue; collection_1.StringMapWrapper.forEach(this.controls, function (control, name) { if (_this._included(name)) { res = fn(res, control, name); } }); return res; }; /** @internal */ ControlGroup.prototype._included = function (controlName) { var isOptional = collection_1.StringMapWrapper.contains(this._optionals, controlName); return !isOptional || collection_1.StringMapWrapper.get(this._optionals, controlName); }; return ControlGroup; }(AbstractControl)); exports.ControlGroup = ControlGroup; /** * Defines a part of a form, of variable length, that can contain other controls. * * A `ControlArray` aggregates the values of each {@link Control} in the group. * The status of a `ControlArray` depends on the status of its children. * If one of the controls in a group is invalid, the entire array is invalid. * Similarly, if a control changes its value, the entire array changes as well. * * `ControlArray` is one of the three fundamental building blocks used to define forms in Angular, * along with {@link Control} and {@link ControlGroup}. {@link ControlGroup} can also contain * other controls, but is of fixed length. * * ## Adding or removing controls * * To change the controls in the array, use the `push`, `insert`, or `removeAt` methods * in `ControlArray` itself. These methods ensure the controls are properly tracked in the * form's hierarchy. Do not modify the array of `AbstractControl`s used to instantiate * the `ControlArray` directly, as that will result in strange and unexpected behavior such * as broken change detection. * * ### Example ([live demo](http://plnkr.co/edit/23DESOpbNnBpBHZt1BR4?p=preview)) */ var ControlArray = (function (_super) { __extends(ControlArray, _super); function ControlArray(controls, validator, asyncValidator) { if (validator === void 0) { validator = null; } if (asyncValidator === void 0) { asyncValidator = null; } _super.call(this, validator, asyncValidator); this.controls = controls; this._initObservables(); this._setParentForControls(); this.updateValueAndValidity({ onlySelf: true, emitEvent: false }); } /** * Get the {@link AbstractControl} at the given `index` in the array. */ ControlArray.prototype.at = function (index) { return this.controls[index]; }; /** * Insert a new {@link AbstractControl} at the end of the array. */ ControlArray.prototype.push = function (control) { this.controls.push(control); control.setParent(this); this.updateValueAndValidity(); }; /** * Insert a new {@link AbstractControl} at the given `index` in the array. */ ControlArray.prototype.insert = function (index, control) { collection_1.ListWrapper.insert(this.controls, index, control); control.setParent(this); this.updateValueAndValidity(); }; /** * Remove the control at the given `index` in the array. */ ControlArray.prototype.removeAt = function (index) { collection_1.ListWrapper.removeAt(this.controls, index); this.updateValueAndValidity(); }; Object.defineProperty(ControlArray.prototype, "length", { /** * Length of the control array. */ get: function () { return this.controls.length; }, enumerable: true, configurable: true }); /** @internal */ ControlArray.prototype._updateValue = function () { this._value = this.controls.map(function (control) { return control.value; }); }; /** @internal */ ControlArray.prototype._anyControlsHaveStatus = function (status) { return this.controls.some(function (c) { return c.status == status; }); }; /** @internal */ ControlArray.prototype._setParentForControls = function () { var _this = this; this.controls.forEach(function (control) { control.setParent(_this); }); }; return ControlArray; }(AbstractControl)); exports.ControlArray = ControlArray; //# sourceMappingURL=model.js.map /***/ }, /* 52 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var core_1 = __webpack_require__(1); /** * `LocationStrategy` is responsible for representing and reading route state * from the browser's URL. Angular provides two strategies: * {@link HashLocationStrategy} and {@link PathLocationStrategy} (default). * * This is used under the hood of the {@link Location} service. * * Applications should use the {@link Router} or {@link Location} services to * interact with application route state. * * For instance, {@link HashLocationStrategy} produces URLs like * `http://example.com#/foo`, and {@link PathLocationStrategy} produces * `http://example.com/foo` as an equivalent URL. * * See these two classes for more. */ var LocationStrategy = (function () { function LocationStrategy() { } return LocationStrategy; }()); exports.LocationStrategy = LocationStrategy; /** * The `APP_BASE_HREF` token represents the base href to be used with the * {@link PathLocationStrategy}. * * If you're using {@link PathLocationStrategy}, you must provide a provider to a string * representing the URL prefix that should be preserved when generating and recognizing * URLs. * * ### Example * * ``` * import {Component} from '@angular/core'; * import {ROUTER_DIRECTIVES, ROUTER_PROVIDERS, RouteConfig} from '@angular/router'; * import {APP_BASE_HREF} from '@angular/common'; * * @Component({directives: [ROUTER_DIRECTIVES]}) * @RouteConfig([ * {...}, * ]) * class AppCmp { * // ... * } * * bootstrap(AppCmp, [ * ROUTER_PROVIDERS, * provide(APP_BASE_HREF, {useValue: '/my/app'}) * ]); * ``` */ exports.APP_BASE_HREF = new core_1.OpaqueToken('appBaseHref'); //# sourceMappingURL=location_strategy.js.map /***/ }, /* 53 */, /* 54 */, /* 55 */, /* 56 */, /* 57 */, /* 58 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var di_1 = __webpack_require__(32); var lang_1 = __webpack_require__(4); /** * A DI Token representing a unique string id assigned to the application by Angular and used * primarily for prefixing application attributes and CSS styles when * {@link ViewEncapsulation#Emulated} is being used. * * If you need to avoid randomly generated value to be used as an application id, you can provide * a custom value via a DI provider configuring the root {@link Injector} * using this token. */ exports.APP_ID = new di_1.OpaqueToken('AppId'); function _appIdRandomProviderFactory() { return "" + _randomChar() + _randomChar() + _randomChar(); } /** * Providers that will generate a random APP_ID_TOKEN. */ exports.APP_ID_RANDOM_PROVIDER = /*@ts2dart_const*/ /* @ts2dart_Provider */ { provide: exports.APP_ID, useFactory: _appIdRandomProviderFactory, deps: [] }; function _randomChar() { return lang_1.StringWrapper.fromCharCode(97 + lang_1.Math.floor(lang_1.Math.random() * 25)); } /** * A function that will be executed when a platform is initialized. */ exports.PLATFORM_INITIALIZER = /*@ts2dart_const*/ new di_1.OpaqueToken("Platform Initializer"); /** * A function that will be executed when an application is initialized. */ exports.APP_INITIALIZER = /*@ts2dart_const*/ new di_1.OpaqueToken("Application Initializer"); /** * A token which indicates the root directory of the application */ exports.PACKAGE_ROOT_URL = /*@ts2dart_const*/ new di_1.OpaqueToken("Application Packages Root URL"); //# sourceMappingURL=application_tokens.js.map /***/ }, /* 59 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var iterable_differs_1 = __webpack_require__(181); var default_iterable_differ_1 = __webpack_require__(101); var keyvalue_differs_1 = __webpack_require__(182); var default_keyvalue_differ_1 = __webpack_require__(180); var default_keyvalue_differ_2 = __webpack_require__(180); exports.DefaultKeyValueDifferFactory = default_keyvalue_differ_2.DefaultKeyValueDifferFactory; exports.KeyValueChangeRecord = default_keyvalue_differ_2.KeyValueChangeRecord; var default_iterable_differ_2 = __webpack_require__(101); exports.DefaultIterableDifferFactory = default_iterable_differ_2.DefaultIterableDifferFactory; exports.CollectionChangeRecord = default_iterable_differ_2.CollectionChangeRecord; var constants_1 = __webpack_require__(60); exports.ChangeDetectionStrategy = constants_1.ChangeDetectionStrategy; exports.CHANGE_DETECTION_STRATEGY_VALUES = constants_1.CHANGE_DETECTION_STRATEGY_VALUES; exports.ChangeDetectorState = constants_1.ChangeDetectorState; exports.CHANGE_DETECTOR_STATE_VALUES = constants_1.CHANGE_DETECTOR_STATE_VALUES; exports.isDefaultChangeDetectionStrategy = constants_1.isDefaultChangeDetectionStrategy; var change_detector_ref_1 = __webpack_require__(383); exports.ChangeDetectorRef = change_detector_ref_1.ChangeDetectorRef; var iterable_differs_2 = __webpack_require__(181); exports.IterableDiffers = iterable_differs_2.IterableDiffers; var keyvalue_differs_2 = __webpack_require__(182); exports.KeyValueDiffers = keyvalue_differs_2.KeyValueDiffers; var default_iterable_differ_3 = __webpack_require__(101); exports.DefaultIterableDiffer = default_iterable_differ_3.DefaultIterableDiffer; var change_detection_util_1 = __webpack_require__(100); exports.WrappedValue = change_detection_util_1.WrappedValue; exports.ValueUnwrapper = change_detection_util_1.ValueUnwrapper; exports.SimpleChange = change_detection_util_1.SimpleChange; exports.devModeEqual = change_detection_util_1.devModeEqual; exports.looseIdentical = change_detection_util_1.looseIdentical; exports.uninitialized = change_detection_util_1.uninitialized; /** * Structural diffing for `Object`s and `Map`s. */ exports.keyValDiff = /*@ts2dart_const*/ [new default_keyvalue_differ_1.DefaultKeyValueDifferFactory()]; /** * Structural diffing for `Iterable` types such as `Array`s. */ exports.iterableDiff = /*@ts2dart_const*/ [new default_iterable_differ_1.DefaultIterableDifferFactory()]; exports.defaultIterableDiffers = new iterable_differs_1.IterableDiffers(exports.iterableDiff); exports.defaultKeyValueDiffers = new keyvalue_differs_1.KeyValueDiffers(exports.keyValDiff); //# sourceMappingURL=change_detection.js.map /***/ }, /* 60 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var lang_1 = __webpack_require__(4); /** * Describes the current state of the change detector. */ (function (ChangeDetectorState) { /** * `NeverChecked` means that the change detector has not been checked yet, and * initialization methods should be called during detection. */ ChangeDetectorState[ChangeDetectorState["NeverChecked"] = 0] = "NeverChecked"; /** * `CheckedBefore` means that the change detector has successfully completed at least * one detection previously. */ ChangeDetectorState[ChangeDetectorState["CheckedBefore"] = 1] = "CheckedBefore"; /** * `Errored` means that the change detector encountered an error checking a binding * or calling a directive lifecycle method and is now in an inconsistent state. Change * detectors in this state will no longer detect changes. */ ChangeDetectorState[ChangeDetectorState["Errored"] = 2] = "Errored"; })(exports.ChangeDetectorState || (exports.ChangeDetectorState = {})); var ChangeDetectorState = exports.ChangeDetectorState; /** * Describes within the change detector which strategy will be used the next time change * detection is triggered. */ (function (ChangeDetectionStrategy) { /** * `CheckedOnce` means that after calling detectChanges the mode of the change detector * will become `Checked`. */ ChangeDetectionStrategy[ChangeDetectionStrategy["CheckOnce"] = 0] = "CheckOnce"; /** * `Checked` means that the change detector should be skipped until its mode changes to * `CheckOnce`. */ ChangeDetectionStrategy[ChangeDetectionStrategy["Checked"] = 1] = "Checked"; /** * `CheckAlways` means that after calling detectChanges the mode of the change detector * will remain `CheckAlways`. */ ChangeDetectionStrategy[ChangeDetectionStrategy["CheckAlways"] = 2] = "CheckAlways"; /** * `Detached` means that the change detector sub tree is not a part of the main tree and * should be skipped. */ ChangeDetectionStrategy[ChangeDetectionStrategy["Detached"] = 3] = "Detached"; /** * `OnPush` means that the change detector's mode will be set to `CheckOnce` during hydration. */ ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 4] = "OnPush"; /** * `Default` means that the change detector's mode will be set to `CheckAlways` during hydration. */ ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 5] = "Default"; })(exports.ChangeDetectionStrategy || (exports.ChangeDetectionStrategy = {})); var ChangeDetectionStrategy = exports.ChangeDetectionStrategy; /** * List of possible {@link ChangeDetectionStrategy} values. */ exports.CHANGE_DETECTION_STRATEGY_VALUES = [ ChangeDetectionStrategy.CheckOnce, ChangeDetectionStrategy.Checked, ChangeDetectionStrategy.CheckAlways, ChangeDetectionStrategy.Detached, ChangeDetectionStrategy.OnPush, ChangeDetectionStrategy.Default ]; /** * List of possible {@link ChangeDetectorState} values. */ exports.CHANGE_DETECTOR_STATE_VALUES = [ ChangeDetectorState.NeverChecked, ChangeDetectorState.CheckedBefore, ChangeDetectorState.Errored ]; function isDefaultChangeDetectionStrategy(changeDetectionStrategy) { return lang_1.isBlank(changeDetectionStrategy) || changeDetectionStrategy === ChangeDetectionStrategy.Default; } exports.isDefaultChangeDetectionStrategy = isDefaultChangeDetectionStrategy; //# sourceMappingURL=constants.js.map /***/ }, /* 61 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var lang_1 = __webpack_require__(4); /** * Allows to refer to references which are not yet defined. * * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of * DI is declared, * but not yet defined. It is also used when the `token` which we use when creating a query is not * yet defined. * * ### Example * {@example core/di/ts/forward_ref/forward_ref.ts region='forward_ref'} */ function forwardRef(forwardRefFn) { forwardRefFn.__forward_ref__ = forwardRef; forwardRefFn.toString = function () { return lang_1.stringify(this()); }; return forwardRefFn; } exports.forwardRef = forwardRef; /** * Lazily retrieves the reference value from a forwardRef. * * Acts as the identity function when given a non-forward-ref value. * * ### Example ([live demo](http://plnkr.co/edit/GU72mJrk1fiodChcmiDR?p=preview)) * * ```typescript * var ref = forwardRef(() => "refValue"); * expect(resolveForwardRef(ref)).toEqual("refValue"); * expect(resolveForwardRef("regularValue")).toEqual("regularValue"); * ``` * * See: {@link forwardRef} */ function resolveForwardRef(type) { if (lang_1.isFunction(type) && type.hasOwnProperty('__forward_ref__') && type.__forward_ref__ === forwardRef) { return type(); } else { return type; } } exports.resolveForwardRef = resolveForwardRef; //# sourceMappingURL=forward_ref.js.map /***/ }, /* 62 */ /***/ function(module, exports) { "use strict"; (function (ViewType) { // A view that contains the host element with bound component directive. // Contains a COMPONENT view ViewType[ViewType["HOST"] = 0] = "HOST"; // The view of the component // Can contain 0 to n EMBEDDED views ViewType[ViewType["COMPONENT"] = 1] = "COMPONENT"; // A view that is embedded into another View via a