/******/ (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) { /******/ modules[moduleId] = moreModules[moduleId]; /******/ } /******/ 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); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(404); __webpack_require__(375); __webpack_require__(8); module.exports = __webpack_require__(151); /***/ }, /* 1 */ /***/ 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; } ; 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) { return type['name']; } exports.getTypeNameForDebugging = getTypeNameForDebugging; exports.Math = _global.Math; exports.Date = _global.Date; var _devMode = !!_global.angularDevMode; var _devModeLocked = false; function lockDevMode() { _devModeLocked = true; } exports.lockDevMode = lockDevMode; /** * Enable Angular's development mode, which turns on assertions and other * checks within the framework. * * One important assertion this enables verifies that a change detection pass * does not result in additional changes to any bindings (also known as * unidirectional data flow). * * {@example core/ts/dev_mode/dev_mode_example.ts region='enableDevMode'} */ function enableDevMode() { // TODO(alxhub): Refactor out of facade/lang as per issue #5157. if (_devModeLocked) { // Cannot use BaseException as that ends up importing from facade/lang. throw 'Cannot enable dev mode after platform setup.'; } _devMode = true; } exports.enableDevMode = enableDevMode; 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 }; // This function is needed only to properly support Dart's const expressions // see https://github.com/angular/ts2dart/pull/151 for more info function CONST_EXPR(expr) { return expr; } exports.CONST_EXPR = CONST_EXPR; function CONST() { return function (target) { return target; }; } exports.CONST = CONST; function isPresent(obj) { return obj !== undefined && obj !== null; } exports.isPresent = isPresent; function isBlank(obj) { return obj === undefined || obj === null; } exports.isBlank = isBlank; 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; function isPromise(obj) { return obj instanceof _global.Promise; } exports.isPromise = isPromise; function isArray(obj) { return Array.isArray(obj); } exports.isArray = isArray; function isNumber(obj) { return typeof obj === 'number'; } exports.isNumber = isNumber; function isDate(obj) { return obj instanceof exports.Date && !isNaN(obj.valueOf()); } exports.isDate = isDate; function stringify(token) { if (typeof token === 'string') { return token; } if (token === undefined || token === null) { return '' + token; } if (token.name) { return token.name; } 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; 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.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 }; }; 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; // 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)) { 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(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; //# sourceMappingURL=lang.js.map /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, /* 2 */ /***/ function(module, exports, __webpack_require__) { 'use strict';/** * @module * @description * The `di` module provides dependency injection container services. */ function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } var metadata_1 = __webpack_require__(38); 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__(108)); var forward_ref_1 = __webpack_require__(110); exports.forwardRef = forward_ref_1.forwardRef; exports.resolveForwardRef = forward_ref_1.resolveForwardRef; var injector_1 = __webpack_require__(191); exports.Injector = injector_1.Injector; var provider_1 = __webpack_require__(66); exports.Binding = provider_1.Binding; exports.ProviderBuilder = provider_1.ProviderBuilder; exports.ResolvedFactory = provider_1.ResolvedFactory; exports.Dependency = provider_1.Dependency; exports.bind = provider_1.bind; exports.Provider = provider_1.Provider; exports.provide = provider_1.provide; var key_1 = __webpack_require__(111); exports.Key = key_1.Key; exports.TypeLiteral = key_1.TypeLiteral; var exceptions_1 = __webpack_require__(109); exports.NoProviderError = exceptions_1.NoProviderError; exports.AbstractProviderError = exceptions_1.AbstractProviderError; exports.CyclicDependencyError = exceptions_1.CyclicDependencyError; exports.InstantiationError = exceptions_1.InstantiationError; exports.InvalidProviderError = exceptions_1.InvalidProviderError; exports.NoAnnotationError = exceptions_1.NoAnnotationError; exports.OutOfBoundsError = exceptions_1.OutOfBoundsError; var opaque_token_1 = __webpack_require__(344); exports.OpaqueToken = opaque_token_1.OpaqueToken; //# sourceMappingURL=di.js.map /***/ }, /* 3 */ /***/ function(module, exports, __webpack_require__) { 'use strict';var lang_1 = __webpack_require__(1); exports.Map = lang_1.global.Map; exports.Set = lang_1.global.Set; // Safari and Internet Explorer do not support the iterable parameter to the // Map constructor. We work around that by manually adding the items. var createMapFromPairs = (function () { try { if (new exports.Map([[1, 2]]).size === 1) { return function createMapFromPairs(pairs) { return new exports.Map(pairs); }; } } catch (e) { } return function createMapAndPopulateFromPairs(pairs) { var map = new exports.Map(); for (var i = 0; i < pairs.length; i++) { var pair = pairs[i]; map.set(pair[0], pair[1]); } return map; }; })(); var createMapFromMap = (function () { try { if (new exports.Map(new exports.Map())) { return function createMapFromMap(m) { return new exports.Map(m); }; } } catch (e) { } return function createMapAndPopulateFromMap(m) { var map = new exports.Map(); m.forEach(function (v, k) { map.set(k, v); }); return map; }; })(); var _clearValues = (function () { if ((new exports.Map()).keys().next) { return function _clearValues(m) { var keyIterator = m.keys(); var k; while (!((k = keyIterator.next()).done)) { m.set(k.value, null); } }; } else { return function _clearValuesWithForeEach(m) { m.forEach(function (v, k) { m.set(k, null); }); }; } })(); // Safari doesn't implement MapIterator.next(), which is used is Traceur's polyfill of Array.from // TODO(mlaval): remove the work around once we have a working polyfill of Array.from var _arrayFromMap = (function () { try { if ((new exports.Map()).values().next) { return function createArrayFromMap(m, getValues) { return getValues ? Array.from(m.values()) : Array.from(m.keys()); }; } } catch (e) { } return function createArrayFromMapWithForeach(m, getValues) { var res = ListWrapper.createFixedSize(m.size), i = 0; m.forEach(function (v, k) { res[i] = getValues ? v : k; i++; }); return res; }; })(); var MapWrapper = (function () { function MapWrapper() { } MapWrapper.clone = function (m) { return createMapFromMap(m); }; MapWrapper.createFromStringMap = function (stringMap) { var result = new exports.Map(); for (var prop in stringMap) { result.set(prop, stringMap[prop]); } return result; }; MapWrapper.toStringMap = function (m) { var r = {}; m.forEach(function (v, k) { return r[k] = v; }); return r; }; MapWrapper.createFromPairs = function (pairs) { return createMapFromPairs(pairs); }; MapWrapper.clearValues = function (m) { _clearValues(m); }; MapWrapper.iterable = function (m) { return m; }; MapWrapper.keys = function (m) { return _arrayFromMap(m, false); }; MapWrapper.values = function (m) { return _arrayFromMap(m, true); }; return MapWrapper; })(); exports.MapWrapper = MapWrapper; /** * Wraps Javascript Objects */ var StringMapWrapper = (function () { function StringMapWrapper() { } StringMapWrapper.create = function () { // Note: We are not using Object.create(null) here due to // performance! // http://jsperf.com/ng2-object-create-null return {}; }; StringMapWrapper.contains = function (map, key) { return map.hasOwnProperty(key); }; StringMapWrapper.get = function (map, key) { return map.hasOwnProperty(key) ? map[key] : undefined; }; StringMapWrapper.set = function (map, key, value) { map[key] = value; }; StringMapWrapper.keys = function (map) { return Object.keys(map); }; StringMapWrapper.isEmpty = function (map) { for (var prop in map) { return false; } return true; }; StringMapWrapper.delete = function (map, key) { delete map[key]; }; StringMapWrapper.forEach = function (map, callback) { for (var prop in map) { if (map.hasOwnProperty(prop)) { callback(map[prop], prop); } } }; StringMapWrapper.merge = function (m1, m2) { var m = {}; for (var attr in m1) { if (m1.hasOwnProperty(attr)) { m[attr] = m1[attr]; } } for (var attr in m2) { if (m2.hasOwnProperty(attr)) { m[attr] = m2[attr]; } } return m; }; StringMapWrapper.equals = function (m1, m2) { var k1 = Object.keys(m1); var k2 = Object.keys(m2); if (k1.length != k2.length) { return false; } var key; for (var i = 0; i < k1.length; i++) { key = k1[i]; if (m1[key] !== m2[key]) { return false; } } return true; }; return StringMapWrapper; })(); exports.StringMapWrapper = StringMapWrapper; var ListWrapper = (function () { function ListWrapper() { } // JS has no way to express a statically fixed size list, but dart does so we // keep both methods. ListWrapper.createFixedSize = function (size) { return new Array(size); }; ListWrapper.createGrowableSize = function (size) { return new Array(size); }; ListWrapper.clone = function (array) { return array.slice(0); }; ListWrapper.forEachWithIndex = function (array, fn) { for (var i = 0; i < array.length; i++) { fn(array[i], i); } }; ListWrapper.first = function (array) { if (!array) return null; return array[0]; }; ListWrapper.last = function (array) { if (!array || array.length == 0) return null; return array[array.length - 1]; }; ListWrapper.indexOf = function (array, value, startIndex) { if (startIndex === void 0) { startIndex = 0; } return array.indexOf(value, startIndex); }; ListWrapper.contains = function (list, el) { return list.indexOf(el) !== -1; }; ListWrapper.reversed = function (array) { var a = ListWrapper.clone(array); return a.reverse(); }; ListWrapper.concat = function (a, b) { return a.concat(b); }; ListWrapper.insert = function (list, index, value) { list.splice(index, 0, value); }; ListWrapper.removeAt = function (list, index) { var res = list[index]; list.splice(index, 1); return res; }; ListWrapper.removeAll = function (list, items) { for (var i = 0; i < items.length; ++i) { var index = list.indexOf(items[i]); list.splice(index, 1); } }; ListWrapper.remove = function (list, el) { var index = list.indexOf(el); if (index > -1) { list.splice(index, 1); return true; } return false; }; ListWrapper.clear = function (list) { list.length = 0; }; ListWrapper.isEmpty = function (list) { return list.length == 0; }; ListWrapper.fill = function (list, value, start, end) { if (start === void 0) { start = 0; } if (end === void 0) { end = null; } list.fill(value, start, end === null ? list.length : end); }; ListWrapper.equals = function (a, b) { if (a.length != b.length) return false; for (var i = 0; i < a.length; ++i) { if (a[i] !== b[i]) return false; } return true; }; ListWrapper.slice = function (l, from, to) { if (from === void 0) { from = 0; } if (to === void 0) { to = null; } return l.slice(from, to === null ? undefined : to); }; ListWrapper.splice = function (l, from, length) { return l.splice(from, length); }; ListWrapper.sort = function (l, compareFn) { if (lang_1.isPresent(compareFn)) { l.sort(compareFn); } else { l.sort(); } }; ListWrapper.toString = function (l) { return l.toString(); }; ListWrapper.toJSON = function (l) { return JSON.stringify(l); }; ListWrapper.maximum = function (list, predicate) { if (list.length == 0) { return null; } var solution = null; var maxValue = -Infinity; for (var index = 0; index < list.length; index++) { var candidate = list[index]; if (lang_1.isBlank(candidate)) { continue; } var candidateValue = predicate(candidate); if (candidateValue > maxValue) { solution = candidate; maxValue = candidateValue; } } return solution; }; return ListWrapper; })(); exports.ListWrapper = ListWrapper; function isListLikeIterable(obj) { if (!lang_1.isJsObject(obj)) return false; return lang_1.isArray(obj) || (!(obj instanceof exports.Map) && lang_1.getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop } exports.isListLikeIterable = isListLikeIterable; function iterateListLike(obj, fn) { if (lang_1.isArray(obj)) { for (var i = 0; i < obj.length; i++) { fn(obj[i]); } } else { var iterator = obj[lang_1.getSymbolIterator()](); var item; while (!((item = iterator.next()).done)) { fn(item.value); } } } exports.iterateListLike = iterateListLike; // Safari and Internet Explorer do not support the iterable parameter to the // Set constructor. We work around that by manually adding the items. var createSetFromList = (function () { var test = new exports.Set([1, 2, 3]); if (test.size === 3) { return function createSetFromList(lst) { return new exports.Set(lst); }; } else { return function createSetAndPopulateFromList(lst) { var res = new exports.Set(lst); if (res.size !== lst.length) { for (var i = 0; i < lst.length; i++) { res.add(lst[i]); } } return res; }; } })(); var SetWrapper = (function () { function SetWrapper() { } SetWrapper.createFromList = function (lst) { return createSetFromList(lst); }; SetWrapper.has = function (s, key) { return s.has(key); }; SetWrapper.delete = function (m, k) { m.delete(k); }; return SetWrapper; })(); exports.SetWrapper = SetWrapper; //# sourceMappingURL=collection.js.map /***/ }, /* 4 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _utilNoop = __webpack_require__(149); var _utilNoop2 = _interopRequireDefault(_utilNoop); var _utilThrowError = __webpack_require__(310); var _utilThrowError2 = _interopRequireDefault(_utilThrowError); var _utilTryOrOnError = __webpack_require__(311); var _utilTryOrOnError2 = _interopRequireDefault(_utilTryOrOnError); var _Subscription2 = __webpack_require__(13); var _Subscription3 = _interopRequireDefault(_Subscription2); var Subscriber = (function (_Subscription) { _inherits(Subscriber, _Subscription); function Subscriber(destination) { _classCallCheck(this, Subscriber); _Subscription.call(this); this.destination = destination; this._isUnsubscribed = false; if (!this.destination) { return; } var subscription = destination._subscription; if (subscription) { this._subscription = subscription; } else if (destination instanceof Subscriber) { this._subscription = destination; } } //# sourceMappingURL=Subscriber.js.map Subscriber.create = function create(next, error, complete) { var subscriber = new Subscriber(); subscriber._next = typeof next === "function" && _utilTryOrOnError2['default'](next) || _utilNoop2['default']; subscriber._error = typeof error === "function" && error || _utilThrowError2['default']; subscriber._complete = typeof complete === "function" && complete || _utilNoop2['default']; return subscriber; }; Subscriber.prototype.add = function add(sub) { // route add to the shared Subscription if it exists var _subscription = this._subscription; if (_subscription) { _subscription.add(sub); } else { _Subscription.prototype.add.call(this, sub); } }; Subscriber.prototype.remove = function remove(sub) { // route remove to the shared Subscription if it exists if (this._subscription) { this._subscription.remove(sub); } else { _Subscription.prototype.remove.call(this, sub); } }; Subscriber.prototype.unsubscribe = function unsubscribe() { if (this._isUnsubscribed) { return; } else if (this._subscription) { this._isUnsubscribed = true; } else { _Subscription.prototype.unsubscribe.call(this); } }; Subscriber.prototype._next = function _next(value) { this.destination.next(value); }; Subscriber.prototype._error = function _error(err) { this.destination.error(err); }; Subscriber.prototype._complete = function _complete() { this.destination.complete(); }; Subscriber.prototype.next = function next(value) { if (!this.isUnsubscribed) { this._next(value); } }; Subscriber.prototype.error = function error(_error2) { if (!this.isUnsubscribed) { this._error(_error2); this.unsubscribe(); } }; Subscriber.prototype.complete = function complete() { if (!this.isUnsubscribed) { this._complete(); this.unsubscribe(); } }; _createClass(Subscriber, [{ key: 'isUnsubscribed', get: function get() { var subscription = this._subscription; if (subscription) { // route to the shared Subscription if it exists return this._isUnsubscribed || subscription.isUnsubscribed; } else { return this._isUnsubscribed; } }, set: function set(value) { var subscription = this._subscription; if (subscription) { // route to the shared Subscription if it exists subscription.isUnsubscribed = Boolean(value); } else { this._isUnsubscribed = Boolean(value); } } }]); return Subscriber; })(_Subscription3['default']); exports['default'] = Subscriber; module.exports = exports['default']; //# sourceMappingURL=Subscriber.js.map /***/ }, /* 5 */ /***/ 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 exception_handler_1 = __webpack_require__(123); var exception_handler_2 = __webpack_require__(123); exports.ExceptionHandler = exception_handler_2.ExceptionHandler; var BaseException = (function (_super) { __extends(BaseException, _super); function BaseException(message) { if (message === void 0) { message = "--"; } _super.call(this, message); this.message = message; this.stack = (new Error(message)).stack; } BaseException.prototype.toString = function () { return this.message; }; return BaseException; })(Error); exports.BaseException = BaseException; var WrappedException = (function (_super) { __extends(WrappedException, _super); function WrappedException(_wrapperMessage, _originalException, _originalStack, _context) { _super.call(this, _wrapperMessage); this._wrapperMessage = _wrapperMessage; this._originalException = _originalException; this._originalStack = _originalStack; this._context = _context; this._wrapperStack = (new Error(_wrapperMessage)).stack; } Object.defineProperty(WrappedException.prototype, "wrapperMessage", { get: function () { return this._wrapperMessage; }, enumerable: true, configurable: true }); Object.defineProperty(WrappedException.prototype, "wrapperStack", { get: function () { return this._wrapperStack; }, enumerable: true, configurable: true }); Object.defineProperty(WrappedException.prototype, "originalException", { get: function () { return this._originalException; }, enumerable: true, configurable: true }); Object.defineProperty(WrappedException.prototype, "originalStack", { get: function () { return this._originalStack; }, enumerable: true, configurable: true }); Object.defineProperty(WrappedException.prototype, "context", { get: function () { return this._context; }, enumerable: true, configurable: true }); Object.defineProperty(WrappedException.prototype, "message", { get: function () { return exception_handler_1.ExceptionHandler.exceptionToString(this); }, enumerable: true, configurable: true }); WrappedException.prototype.toString = function () { return this.message; }; return WrappedException; })(Error); exports.WrappedException = WrappedException; function makeTypeError(message) { return new TypeError(message); } exports.makeTypeError = makeTypeError; function unimplemented() { throw new BaseException('unimplemented'); } exports.unimplemented = unimplemented; //# sourceMappingURL=exceptions.js.map /***/ }, /* 6 */ /***/ function(module, exports) { "use strict"; exports.__esModule = true; var errorObject = { e: {} }; exports.errorObject = errorObject; //# sourceMappingURL=errorObject.js.map //# sourceMappingURL=errorObject.js.map /***/ }, /* 7 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports['default'] = tryCatch; var _errorObject = __webpack_require__(6); var tryCatchTarget = undefined; function tryCatcher() { try { return tryCatchTarget.apply(this, arguments); } catch (e) { _errorObject.errorObject.e = e; return _errorObject.errorObject; } } function tryCatch(fn) { tryCatchTarget = fn; return tryCatcher; } ; //# sourceMappingURL=tryCatch.js.map module.exports = exports['default']; //# sourceMappingURL=tryCatch.js.map /***/ }, /* 8 */ /***/ 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__(150)); __export(__webpack_require__(151)); __export(__webpack_require__(314)); __export(__webpack_require__(313)); __export(__webpack_require__(312)); __export(__webpack_require__(368)); //# sourceMappingURL=angular2.js.map /***/ }, /* 9 */ /***/ function(module, exports, __webpack_require__) { 'use strict';/** * This indirection is needed to free up Component, etc symbols in the public API * to be used by the decorator versions of these annotations. */ var di_1 = __webpack_require__(116); exports.QueryMetadata = di_1.QueryMetadata; exports.ContentChildrenMetadata = di_1.ContentChildrenMetadata; exports.ContentChildMetadata = di_1.ContentChildMetadata; exports.ViewChildrenMetadata = di_1.ViewChildrenMetadata; exports.ViewQueryMetadata = di_1.ViewQueryMetadata; exports.ViewChildMetadata = di_1.ViewChildMetadata; exports.AttributeMetadata = di_1.AttributeMetadata; var directives_1 = __webpack_require__(48); exports.ComponentMetadata = directives_1.ComponentMetadata; exports.DirectiveMetadata = directives_1.DirectiveMetadata; exports.PipeMetadata = directives_1.PipeMetadata; exports.InputMetadata = directives_1.InputMetadata; exports.OutputMetadata = directives_1.OutputMetadata; exports.HostBindingMetadata = directives_1.HostBindingMetadata; exports.HostListenerMetadata = directives_1.HostListenerMetadata; var view_1 = __webpack_require__(33); exports.ViewMetadata = view_1.ViewMetadata; exports.ViewEncapsulation = view_1.ViewEncapsulation; var di_2 = __webpack_require__(116); var directives_2 = __webpack_require__(48); var view_2 = __webpack_require__(33); var decorators_1 = __webpack_require__(122); // TODO(alexeagle): remove the duplication of this doc. It is copied from ComponentMetadata. /** * Declare reusable UI building blocks for an application. * * Each Angular component requires a single `@Component` and at least one `@View` annotation. The * `@Component` * annotation specifies when a component is instantiated, and which properties and hostListeners it * binds to. * * When a component is instantiated, Angular * - creates a shadow DOM for the component. * - loads the selected template into the shadow DOM. * - creates all the injectable objects configured with `providers` and `viewProviders`. * * All template expressions and statements are then evaluated against the component instance. * * For details on the `@View` annotation, see {@link ViewMetadata}. * * ## Lifecycle hooks * * When the component class implements some {@link angular2/lifecycle_hooks} the callbacks are * called by the change detection at defined points in time during the life of the component. * * ### Example * * ``` * @Component({ * selector: 'greet', * template: 'Hello {{name}}!' * }) * class Greet { * name: string; * * constructor() { * this.name = 'World'; * } * } * ``` * */ exports.Component = decorators_1.makeDecorator(directives_2.ComponentMetadata, function (fn) { return fn.View = exports.View; }); // TODO(alexeagle): remove the duplication of this doc. It is copied from DirectiveMetadata. /** * Directives allow you to attach behavior to elements in the DOM. * * {@link DirectiveMetadata}s with an embedded view are called {@link ComponentMetadata}s. * * A directive consists of a single directive annotation and a controller class. When the * directive's `selector` matches * elements in the DOM, the following steps occur: * * 1. For each directive, the `ElementInjector` attempts to resolve the directive's constructor * arguments. * 2. Angular instantiates directives for each matched element using `ElementInjector` in a * depth-first order, * as declared in the HTML. * * ## Understanding How Injection Works * * There are three stages of injection resolution. * - *Pre-existing Injectors*: * - The terminal {@link Injector} cannot resolve dependencies. It either throws an error or, if * the dependency was * specified as `@Optional`, returns `null`. * - The platform injector resolves browser singleton resources, such as: cookies, title, * location, and others. * - *Component Injectors*: Each component instance has its own {@link Injector}, and they follow * the same parent-child hierarchy * as the component instances in the DOM. * - *Element Injectors*: Each component instance has a Shadow DOM. Within the Shadow DOM each * element has an `ElementInjector` * which follow the same parent-child hierarchy as the DOM elements themselves. * * When a template is instantiated, it also must instantiate the corresponding directives in a * depth-first order. The * current `ElementInjector` resolves the constructor dependencies for each directive. * * Angular then resolves dependencies as follows, according to the order in which they appear in the * {@link ViewMetadata}: * * 1. Dependencies on the current element * 2. Dependencies on element injectors and their parents until it encounters a Shadow DOM boundary * 3. Dependencies on component injectors and their parents until it encounters the root component * 4. Dependencies on pre-existing injectors * * * The `ElementInjector` can inject other directives, element-specific special objects, or it can * delegate to the parent * injector. * * To inject other directives, declare the constructor parameter as: * - `directive:DirectiveType`: a directive on the current element only * - `@Host() directive:DirectiveType`: any directive that matches the type between the current * element and the * Shadow DOM root. * - `@Query(DirectiveType) query:QueryList`: A live collection of direct child * directives. * - `@QueryDescendants(DirectiveType) query:QueryList`: A live collection of any * child directives. * * To inject element-specific special objects, declare the constructor parameter as: * - `element: ElementRef` to obtain a reference to logical element in the view. * - `viewContainer: ViewContainerRef` to control child template instantiation, for * {@link DirectiveMetadata} directives only * - `bindingPropagation: BindingPropagation` to control change detection in a more granular way. * * ### Example * * The following example demonstrates how dependency injection resolves constructor arguments in * practice. * * * Assume this HTML template: * * ``` *
*
*
*
*
*
*
*
*
*
* ``` * * With the following `dependency` decorator and `SomeService` injectable class. * * ``` * @Injectable() * class SomeService { * } * * @Directive({ * selector: '[dependency]', * inputs: [ * 'id: dependency' * ] * }) * class Dependency { * id:string; * } * ``` * * Let's step through the different ways in which `MyDirective` could be declared... * * * ### No injection * * Here the constructor is declared with no arguments, therefore nothing is injected into * `MyDirective`. * * ``` * @Directive({ selector: '[my-directive]' }) * class MyDirective { * constructor() { * } * } * ``` * * This directive would be instantiated with no dependencies. * * * ### Component-level injection * * Directives can inject any injectable instance from the closest component injector or any of its * parents. * * Here, the constructor declares a parameter, `someService`, and injects the `SomeService` type * from the parent * component's injector. * ``` * @Directive({ selector: '[my-directive]' }) * class MyDirective { * constructor(someService: SomeService) { * } * } * ``` * * This directive would be instantiated with a dependency on `SomeService`. * * * ### Injecting a directive from the current element * * Directives can inject other directives declared on the current element. * * ``` * @Directive({ selector: '[my-directive]' }) * class MyDirective { * constructor(dependency: Dependency) { * expect(dependency.id).toEqual(3); * } * } * ``` * This directive would be instantiated with `Dependency` declared at the same element, in this case * `dependency="3"`. * * ### Injecting a directive from any ancestor elements * * Directives can inject other directives declared on any ancestor element (in the current Shadow * DOM), i.e. on the current element, the * parent element, or its parents. * ``` * @Directive({ selector: '[my-directive]' }) * class MyDirective { * constructor(@Host() dependency: Dependency) { * expect(dependency.id).toEqual(2); * } * } * ``` * * `@Host` checks the current element, the parent, as well as its parents recursively. If * `dependency="2"` didn't * exist on the direct parent, this injection would * have returned * `dependency="1"`. * * * ### Injecting a live collection of direct child directives * * * A directive can also query for other child directives. Since parent directives are instantiated * before child directives, a directive can't simply inject the list of child directives. Instead, * the directive injects a {@link QueryList}, which updates its contents as children are added, * removed, or moved by a directive that uses a {@link ViewContainerRef} such as a `ng-for`, an * `ng-if`, or an `ng-switch`. * * ``` * @Directive({ selector: '[my-directive]' }) * class MyDirective { * constructor(@Query(Dependency) dependencies:QueryList) { * } * } * ``` * * This directive would be instantiated with a {@link QueryList} which contains `Dependency` 4 and * 6. Here, `Dependency` 5 would not be included, because it is not a direct child. * * ### Injecting a live collection of descendant directives * * By passing the descendant flag to `@Query` above, we can include the children of the child * elements. * * ``` * @Directive({ selector: '[my-directive]' }) * class MyDirective { * constructor(@Query(Dependency, {descendants: true}) dependencies:QueryList) { * } * } * ``` * * This directive would be instantiated with a Query which would contain `Dependency` 4, 5 and 6. * * ### Optional injection * * The normal behavior of directives is to return an error when a specified dependency cannot be * resolved. If you * would like to inject `null` on unresolved dependency instead, you can annotate that dependency * with `@Optional()`. * This explicitly permits the author of a template to treat some of the surrounding directives as * optional. * * ``` * @Directive({ selector: '[my-directive]' }) * class MyDirective { * constructor(@Optional() dependency:Dependency) { * } * } * ``` * * This directive would be instantiated with a `Dependency` directive found on the current element. * If none can be * found, the injector supplies `null` instead of throwing an error. * * ### Example * * Here we use a decorator directive to simply define basic tool-tip behavior. * * ``` * @Directive({ * selector: '[tooltip]', * inputs: [ * 'text: tooltip' * ], * host: { * '(mouseenter)': 'onMouseEnter()', * '(mouseleave)': 'onMouseLeave()' * } * }) * class Tooltip{ * text:string; * overlay:Overlay; // NOT YET IMPLEMENTED * overlayManager:OverlayManager; // NOT YET IMPLEMENTED * * constructor(overlayManager:OverlayManager) { * this.overlay = overlay; * } * * onMouseEnter() { * // exact signature to be determined * this.overlay = this.overlayManager.open(text, ...); * } * * onMouseLeave() { * this.overlay.close(); * this.overlay = null; * } * } * ``` * In our HTML template, we can then add this behavior to a `
` or any other element with the * `tooltip` selector, * like so: * * ``` *
* ``` * * Directives can also control the instantiation, destruction, and positioning of inline template * elements: * * A directive uses a {@link ViewContainerRef} to instantiate, insert, move, and destroy views at * runtime. * The {@link ViewContainerRef} is created as a result of `