UNPKG

105 kBJavaScriptView Raw
1/**
2 * @license Angular v10.0.9
3 * (c) 2010-2020 Google LLC. https://angular.io/
4 * License: MIT
5 */
6
7(function (global, factory) {
8 typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core')) :
9 typeof define === 'function' && define.amd ? define('@angular/platform-browser', ['exports', '@angular/common', '@angular/core'], factory) :
10 (global = global || self, factory((global.ng = global.ng || {}, global.ng.platformBrowser = {}), global.ng.common, global.ng.core));
11}(this, (function (exports, common, i0) { 'use strict';
12
13 /*! *****************************************************************************
14 Copyright (c) Microsoft Corporation.
15
16 Permission to use, copy, modify, and/or distribute this software for any
17 purpose with or without fee is hereby granted.
18
19 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
20 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
21 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
22 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
23 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
24 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
25 PERFORMANCE OF THIS SOFTWARE.
26 ***************************************************************************** */
27 /* global Reflect, Promise */
28 var extendStatics = function (d, b) {
29 extendStatics = Object.setPrototypeOf ||
30 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
31 function (d, b) { for (var p in b)
32 if (b.hasOwnProperty(p))
33 d[p] = b[p]; };
34 return extendStatics(d, b);
35 };
36 function __extends(d, b) {
37 extendStatics(d, b);
38 function __() { this.constructor = d; }
39 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
40 }
41 var __assign = function () {
42 __assign = Object.assign || function __assign(t) {
43 for (var s, i = 1, n = arguments.length; i < n; i++) {
44 s = arguments[i];
45 for (var p in s)
46 if (Object.prototype.hasOwnProperty.call(s, p))
47 t[p] = s[p];
48 }
49 return t;
50 };
51 return __assign.apply(this, arguments);
52 };
53 function __rest(s, e) {
54 var t = {};
55 for (var p in s)
56 if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
57 t[p] = s[p];
58 if (s != null && typeof Object.getOwnPropertySymbols === "function")
59 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
60 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
61 t[p[i]] = s[p[i]];
62 }
63 return t;
64 }
65 function __decorate(decorators, target, key, desc) {
66 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
67 if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
68 r = Reflect.decorate(decorators, target, key, desc);
69 else
70 for (var i = decorators.length - 1; i >= 0; i--)
71 if (d = decorators[i])
72 r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
73 return c > 3 && r && Object.defineProperty(target, key, r), r;
74 }
75 function __param(paramIndex, decorator) {
76 return function (target, key) { decorator(target, key, paramIndex); };
77 }
78 function __metadata(metadataKey, metadataValue) {
79 if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
80 return Reflect.metadata(metadataKey, metadataValue);
81 }
82 function __awaiter(thisArg, _arguments, P, generator) {
83 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
84 return new (P || (P = Promise))(function (resolve, reject) {
85 function fulfilled(value) { try {
86 step(generator.next(value));
87 }
88 catch (e) {
89 reject(e);
90 } }
91 function rejected(value) { try {
92 step(generator["throw"](value));
93 }
94 catch (e) {
95 reject(e);
96 } }
97 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
98 step((generator = generator.apply(thisArg, _arguments || [])).next());
99 });
100 }
101 function __generator(thisArg, body) {
102 var _ = { label: 0, sent: function () { if (t[0] & 1)
103 throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
104 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
105 function verb(n) { return function (v) { return step([n, v]); }; }
106 function step(op) {
107 if (f)
108 throw new TypeError("Generator is already executing.");
109 while (_)
110 try {
111 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
112 return t;
113 if (y = 0, t)
114 op = [op[0] & 2, t.value];
115 switch (op[0]) {
116 case 0:
117 case 1:
118 t = op;
119 break;
120 case 4:
121 _.label++;
122 return { value: op[1], done: false };
123 case 5:
124 _.label++;
125 y = op[1];
126 op = [0];
127 continue;
128 case 7:
129 op = _.ops.pop();
130 _.trys.pop();
131 continue;
132 default:
133 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
134 _ = 0;
135 continue;
136 }
137 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
138 _.label = op[1];
139 break;
140 }
141 if (op[0] === 6 && _.label < t[1]) {
142 _.label = t[1];
143 t = op;
144 break;
145 }
146 if (t && _.label < t[2]) {
147 _.label = t[2];
148 _.ops.push(op);
149 break;
150 }
151 if (t[2])
152 _.ops.pop();
153 _.trys.pop();
154 continue;
155 }
156 op = body.call(thisArg, _);
157 }
158 catch (e) {
159 op = [6, e];
160 y = 0;
161 }
162 finally {
163 f = t = 0;
164 }
165 if (op[0] & 5)
166 throw op[1];
167 return { value: op[0] ? op[1] : void 0, done: true };
168 }
169 }
170 var __createBinding = Object.create ? (function (o, m, k, k2) {
171 if (k2 === undefined)
172 k2 = k;
173 Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
174 }) : (function (o, m, k, k2) {
175 if (k2 === undefined)
176 k2 = k;
177 o[k2] = m[k];
178 });
179 function __exportStar(m, exports) {
180 for (var p in m)
181 if (p !== "default" && !exports.hasOwnProperty(p))
182 __createBinding(exports, m, p);
183 }
184 function __values(o) {
185 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
186 if (m)
187 return m.call(o);
188 if (o && typeof o.length === "number")
189 return {
190 next: function () {
191 if (o && i >= o.length)
192 o = void 0;
193 return { value: o && o[i++], done: !o };
194 }
195 };
196 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
197 }
198 function __read(o, n) {
199 var m = typeof Symbol === "function" && o[Symbol.iterator];
200 if (!m)
201 return o;
202 var i = m.call(o), r, ar = [], e;
203 try {
204 while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
205 ar.push(r.value);
206 }
207 catch (error) {
208 e = { error: error };
209 }
210 finally {
211 try {
212 if (r && !r.done && (m = i["return"]))
213 m.call(i);
214 }
215 finally {
216 if (e)
217 throw e.error;
218 }
219 }
220 return ar;
221 }
222 function __spread() {
223 for (var ar = [], i = 0; i < arguments.length; i++)
224 ar = ar.concat(__read(arguments[i]));
225 return ar;
226 }
227 function __spreadArrays() {
228 for (var s = 0, i = 0, il = arguments.length; i < il; i++)
229 s += arguments[i].length;
230 for (var r = Array(s), k = 0, i = 0; i < il; i++)
231 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
232 r[k] = a[j];
233 return r;
234 }
235 ;
236 function __await(v) {
237 return this instanceof __await ? (this.v = v, this) : new __await(v);
238 }
239 function __asyncGenerator(thisArg, _arguments, generator) {
240 if (!Symbol.asyncIterator)
241 throw new TypeError("Symbol.asyncIterator is not defined.");
242 var g = generator.apply(thisArg, _arguments || []), i, q = [];
243 return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
244 function verb(n) { if (g[n])
245 i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
246 function resume(n, v) { try {
247 step(g[n](v));
248 }
249 catch (e) {
250 settle(q[0][3], e);
251 } }
252 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
253 function fulfill(value) { resume("next", value); }
254 function reject(value) { resume("throw", value); }
255 function settle(f, v) { if (f(v), q.shift(), q.length)
256 resume(q[0][0], q[0][1]); }
257 }
258 function __asyncDelegator(o) {
259 var i, p;
260 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
261 function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
262 }
263 function __asyncValues(o) {
264 if (!Symbol.asyncIterator)
265 throw new TypeError("Symbol.asyncIterator is not defined.");
266 var m = o[Symbol.asyncIterator], i;
267 return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
268 function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
269 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
270 }
271 function __makeTemplateObject(cooked, raw) {
272 if (Object.defineProperty) {
273 Object.defineProperty(cooked, "raw", { value: raw });
274 }
275 else {
276 cooked.raw = raw;
277 }
278 return cooked;
279 }
280 ;
281 var __setModuleDefault = Object.create ? (function (o, v) {
282 Object.defineProperty(o, "default", { enumerable: true, value: v });
283 }) : function (o, v) {
284 o["default"] = v;
285 };
286 function __importStar(mod) {
287 if (mod && mod.__esModule)
288 return mod;
289 var result = {};
290 if (mod != null)
291 for (var k in mod)
292 if (Object.hasOwnProperty.call(mod, k))
293 __createBinding(result, mod, k);
294 __setModuleDefault(result, mod);
295 return result;
296 }
297 function __importDefault(mod) {
298 return (mod && mod.__esModule) ? mod : { default: mod };
299 }
300 function __classPrivateFieldGet(receiver, privateMap) {
301 if (!privateMap.has(receiver)) {
302 throw new TypeError("attempted to get private field on non-instance");
303 }
304 return privateMap.get(receiver);
305 }
306 function __classPrivateFieldSet(receiver, privateMap, value) {
307 if (!privateMap.has(receiver)) {
308 throw new TypeError("attempted to set private field on non-instance");
309 }
310 privateMap.set(receiver, value);
311 return value;
312 }
313
314 /**
315 * Provides DOM operations in any browser environment.
316 *
317 * @security Tread carefully! Interacting with the DOM directly is dangerous and
318 * can introduce XSS risks.
319 */
320 var GenericBrowserDomAdapter = /** @class */ (function (_super) {
321 __extends(GenericBrowserDomAdapter, _super);
322 function GenericBrowserDomAdapter() {
323 return _super.call(this) || this;
324 }
325 GenericBrowserDomAdapter.prototype.supportsDOMEvents = function () {
326 return true;
327 };
328 return GenericBrowserDomAdapter;
329 }(common.ɵDomAdapter));
330
331 var ɵ0 = function () {
332 if (i0.ɵglobal['Node']) {
333 return i0.ɵglobal['Node'].prototype.contains || function (node) {
334 return !!(this.compareDocumentPosition(node) & 16);
335 };
336 }
337 return undefined;
338 };
339 var nodeContains = (ɵ0)();
340 /**
341 * A `DomAdapter` powered by full browser DOM APIs.
342 *
343 * @security Tread carefully! Interacting with the DOM directly is dangerous and
344 * can introduce XSS risks.
345 */
346 /* tslint:disable:requireParameterType no-console */
347 var BrowserDomAdapter = /** @class */ (function (_super) {
348 __extends(BrowserDomAdapter, _super);
349 function BrowserDomAdapter() {
350 return _super !== null && _super.apply(this, arguments) || this;
351 }
352 BrowserDomAdapter.makeCurrent = function () {
353 common.ɵsetRootDomAdapter(new BrowserDomAdapter());
354 };
355 BrowserDomAdapter.prototype.getProperty = function (el, name) {
356 return el[name];
357 };
358 BrowserDomAdapter.prototype.log = function (error) {
359 if (window.console) {
360 window.console.log && window.console.log(error);
361 }
362 };
363 BrowserDomAdapter.prototype.logGroup = function (error) {
364 if (window.console) {
365 window.console.group && window.console.group(error);
366 }
367 };
368 BrowserDomAdapter.prototype.logGroupEnd = function () {
369 if (window.console) {
370 window.console.groupEnd && window.console.groupEnd();
371 }
372 };
373 BrowserDomAdapter.prototype.onAndCancel = function (el, evt, listener) {
374 el.addEventListener(evt, listener, false);
375 // Needed to follow Dart's subscription semantic, until fix of
376 // https://code.google.com/p/dart/issues/detail?id=17406
377 return function () {
378 el.removeEventListener(evt, listener, false);
379 };
380 };
381 BrowserDomAdapter.prototype.dispatchEvent = function (el, evt) {
382 el.dispatchEvent(evt);
383 };
384 BrowserDomAdapter.prototype.remove = function (node) {
385 if (node.parentNode) {
386 node.parentNode.removeChild(node);
387 }
388 return node;
389 };
390 BrowserDomAdapter.prototype.getValue = function (el) {
391 return el.value;
392 };
393 BrowserDomAdapter.prototype.createElement = function (tagName, doc) {
394 doc = doc || this.getDefaultDocument();
395 return doc.createElement(tagName);
396 };
397 BrowserDomAdapter.prototype.createHtmlDocument = function () {
398 return document.implementation.createHTMLDocument('fakeTitle');
399 };
400 BrowserDomAdapter.prototype.getDefaultDocument = function () {
401 return document;
402 };
403 BrowserDomAdapter.prototype.isElementNode = function (node) {
404 return node.nodeType === Node.ELEMENT_NODE;
405 };
406 BrowserDomAdapter.prototype.isShadowRoot = function (node) {
407 return node instanceof DocumentFragment;
408 };
409 BrowserDomAdapter.prototype.getGlobalEventTarget = function (doc, target) {
410 if (target === 'window') {
411 return window;
412 }
413 if (target === 'document') {
414 return doc;
415 }
416 if (target === 'body') {
417 return doc.body;
418 }
419 return null;
420 };
421 BrowserDomAdapter.prototype.getHistory = function () {
422 return window.history;
423 };
424 BrowserDomAdapter.prototype.getLocation = function () {
425 return window.location;
426 };
427 BrowserDomAdapter.prototype.getBaseHref = function (doc) {
428 var href = getBaseElementHref();
429 return href == null ? null : relativePath(href);
430 };
431 BrowserDomAdapter.prototype.resetBaseElement = function () {
432 baseElement = null;
433 };
434 BrowserDomAdapter.prototype.getUserAgent = function () {
435 return window.navigator.userAgent;
436 };
437 BrowserDomAdapter.prototype.performanceNow = function () {
438 // performance.now() is not available in all browsers, see
439 // http://caniuse.com/#search=performance.now
440 return window.performance && window.performance.now ? window.performance.now() :
441 new Date().getTime();
442 };
443 BrowserDomAdapter.prototype.supportsCookies = function () {
444 return true;
445 };
446 BrowserDomAdapter.prototype.getCookie = function (name) {
447 return common.ɵparseCookieValue(document.cookie, name);
448 };
449 return BrowserDomAdapter;
450 }(GenericBrowserDomAdapter));
451 var baseElement = null;
452 function getBaseElementHref() {
453 if (!baseElement) {
454 baseElement = document.querySelector('base');
455 if (!baseElement) {
456 return null;
457 }
458 }
459 return baseElement.getAttribute('href');
460 }
461 // based on urlUtils.js in AngularJS 1
462 var urlParsingNode;
463 function relativePath(url) {
464 if (!urlParsingNode) {
465 urlParsingNode = document.createElement('a');
466 }
467 urlParsingNode.setAttribute('href', url);
468 return (urlParsingNode.pathname.charAt(0) === '/') ? urlParsingNode.pathname :
469 '/' + urlParsingNode.pathname;
470 }
471
472 /**
473 * @license
474 * Copyright Google LLC All Rights Reserved.
475 *
476 * Use of this source code is governed by an MIT-style license that can be
477 * found in the LICENSE file at https://angular.io/license
478 */
479 /**
480 * An id that identifies a particular application being bootstrapped, that should
481 * match across the client/server boundary.
482 */
483 var TRANSITION_ID = new i0.InjectionToken('TRANSITION_ID');
484 function appInitializerFactory(transitionId, document, injector) {
485 return function () {
486 // Wait for all application initializers to be completed before removing the styles set by
487 // the server.
488 injector.get(i0.ApplicationInitStatus).donePromise.then(function () {
489 var dom = common.ɵgetDOM();
490 var styles = Array.prototype.slice.apply(document.querySelectorAll("style[ng-transition]"));
491 styles.filter(function (el) { return el.getAttribute('ng-transition') === transitionId; })
492 .forEach(function (el) { return dom.remove(el); });
493 });
494 };
495 }
496 var SERVER_TRANSITION_PROVIDERS = [
497 {
498 provide: i0.APP_INITIALIZER,
499 useFactory: appInitializerFactory,
500 deps: [TRANSITION_ID, common.DOCUMENT, i0.Injector],
501 multi: true
502 },
503 ];
504
505 /**
506 * @license
507 * Copyright Google LLC All Rights Reserved.
508 *
509 * Use of this source code is governed by an MIT-style license that can be
510 * found in the LICENSE file at https://angular.io/license
511 */
512 var BrowserGetTestability = /** @class */ (function () {
513 function BrowserGetTestability() {
514 }
515 BrowserGetTestability.init = function () {
516 i0.setTestabilityGetter(new BrowserGetTestability());
517 };
518 BrowserGetTestability.prototype.addToWindow = function (registry) {
519 i0.ɵglobal['getAngularTestability'] = function (elem, findInAncestors) {
520 if (findInAncestors === void 0) { findInAncestors = true; }
521 var testability = registry.findTestabilityInTree(elem, findInAncestors);
522 if (testability == null) {
523 throw new Error('Could not find testability for element.');
524 }
525 return testability;
526 };
527 i0.ɵglobal['getAllAngularTestabilities'] = function () { return registry.getAllTestabilities(); };
528 i0.ɵglobal['getAllAngularRootElements'] = function () { return registry.getAllRootElements(); };
529 var whenAllStable = function (callback /** TODO #9100 */) {
530 var testabilities = i0.ɵglobal['getAllAngularTestabilities']();
531 var count = testabilities.length;
532 var didWork = false;
533 var decrement = function (didWork_ /** TODO #9100 */) {
534 didWork = didWork || didWork_;
535 count--;
536 if (count == 0) {
537 callback(didWork);
538 }
539 };
540 testabilities.forEach(function (testability /** TODO #9100 */) {
541 testability.whenStable(decrement);
542 });
543 };
544 if (!i0.ɵglobal['frameworkStabilizers']) {
545 i0.ɵglobal['frameworkStabilizers'] = [];
546 }
547 i0.ɵglobal['frameworkStabilizers'].push(whenAllStable);
548 };
549 BrowserGetTestability.prototype.findTestabilityInTree = function (registry, elem, findInAncestors) {
550 if (elem == null) {
551 return null;
552 }
553 var t = registry.getTestability(elem);
554 if (t != null) {
555 return t;
556 }
557 else if (!findInAncestors) {
558 return null;
559 }
560 if (common.ɵgetDOM().isShadowRoot(elem)) {
561 return this.findTestabilityInTree(registry, elem.host, true);
562 }
563 return this.findTestabilityInTree(registry, elem.parentElement, true);
564 };
565 return BrowserGetTestability;
566 }());
567
568 /**
569 * @license
570 * Copyright Google LLC All Rights Reserved.
571 *
572 * Use of this source code is governed by an MIT-style license that can be
573 * found in the LICENSE file at https://angular.io/license
574 */
575 var CAMEL_CASE_REGEXP = /([A-Z])/g;
576 var DASH_CASE_REGEXP = /-([a-z])/g;
577 function camelCaseToDashCase(input) {
578 return input.replace(CAMEL_CASE_REGEXP, function () {
579 var m = [];
580 for (var _i = 0; _i < arguments.length; _i++) {
581 m[_i] = arguments[_i];
582 }
583 return '-' + m[1].toLowerCase();
584 });
585 }
586 function dashCaseToCamelCase(input) {
587 return input.replace(DASH_CASE_REGEXP, function () {
588 var m = [];
589 for (var _i = 0; _i < arguments.length; _i++) {
590 m[_i] = arguments[_i];
591 }
592 return m[1].toUpperCase();
593 });
594 }
595 /**
596 * Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if
597 * `name` is `'probe'`.
598 * @param name Name under which it will be exported. Keep in mind this will be a property of the
599 * global `ng` object.
600 * @param value The value to export.
601 */
602 function exportNgVar(name, value) {
603 if (typeof COMPILED === 'undefined' || !COMPILED) {
604 // Note: we can't export `ng` when using closure enhanced optimization as:
605 // - closure declares globals itself for minified names, which sometimes clobber our `ng` global
606 // - we can't declare a closure extern as the namespace `ng` is already used within Google
607 // for typings for angularJS (via `goog.provide('ng....')`).
608 var ng = i0.ɵglobal['ng'] = i0.ɵglobal['ng'] || {};
609 ng[name] = value;
610 }
611 }
612
613 /**
614 * @license
615 * Copyright Google LLC All Rights Reserved.
616 *
617 * Use of this source code is governed by an MIT-style license that can be
618 * found in the LICENSE file at https://angular.io/license
619 */
620 var ɵ0$1 = function () { return ({
621 'ApplicationRef': i0.ApplicationRef,
622 'NgZone': i0.NgZone,
623 }); };
624 var CORE_TOKENS = (ɵ0$1)();
625 var INSPECT_GLOBAL_NAME = 'probe';
626 var CORE_TOKENS_GLOBAL_NAME = 'coreTokens';
627 /**
628 * Returns a {@link DebugElement} for the given native DOM element, or
629 * null if the given native element does not have an Angular view associated
630 * with it.
631 */
632 function inspectNativeElementR2(element) {
633 return i0.ɵgetDebugNodeR2(element);
634 }
635 function _createNgProbeR2(coreTokens) {
636 exportNgVar(INSPECT_GLOBAL_NAME, inspectNativeElementR2);
637 exportNgVar(CORE_TOKENS_GLOBAL_NAME, Object.assign(Object.assign({}, CORE_TOKENS), _ngProbeTokensToMap(coreTokens || [])));
638 return function () { return inspectNativeElementR2; };
639 }
640 function _ngProbeTokensToMap(tokens) {
641 return tokens.reduce(function (prev, t) { return (prev[t.name] = t.token, prev); }, {});
642 }
643 /**
644 * In Ivy, we don't support NgProbe because we have our own set of testing utilities
645 * with more robust functionality.
646 *
647 * We shouldn't bring in NgProbe because it prevents DebugNode and friends from
648 * tree-shaking properly.
649 */
650 var ELEMENT_PROBE_PROVIDERS__POST_R3__ = [];
651 /**
652 * Providers which support debugging Angular applications (e.g. via `ng.probe`).
653 */
654 var ELEMENT_PROBE_PROVIDERS__PRE_R3__ = [
655 {
656 provide: i0.APP_INITIALIZER,
657 useFactory: _createNgProbeR2,
658 deps: [
659 [i0.NgProbeToken, new i0.Optional()],
660 ],
661 multi: true,
662 },
663 ];
664 var ELEMENT_PROBE_PROVIDERS = ELEMENT_PROBE_PROVIDERS__PRE_R3__;
665
666 /**
667 * @license
668 * Copyright Google LLC All Rights Reserved.
669 *
670 * Use of this source code is governed by an MIT-style license that can be
671 * found in the LICENSE file at https://angular.io/license
672 */
673 /**
674 * The injection token for the event-manager plug-in service.
675 *
676 * @publicApi
677 */
678 var EVENT_MANAGER_PLUGINS = new i0.InjectionToken('EventManagerPlugins');
679 /**
680 * An injectable service that provides event management for Angular
681 * through a browser plug-in.
682 *
683 * @publicApi
684 */
685 var EventManager = /** @class */ (function () {
686 /**
687 * Initializes an instance of the event-manager service.
688 */
689 function EventManager(plugins, _zone) {
690 var _this = this;
691 this._zone = _zone;
692 this._eventNameToPlugin = new Map();
693 plugins.forEach(function (p) { return p.manager = _this; });
694 this._plugins = plugins.slice().reverse();
695 }
696 /**
697 * Registers a handler for a specific element and event.
698 *
699 * @param element The HTML element to receive event notifications.
700 * @param eventName The name of the event to listen for.
701 * @param handler A function to call when the notification occurs. Receives the
702 * event object as an argument.
703 * @returns A callback function that can be used to remove the handler.
704 */
705 EventManager.prototype.addEventListener = function (element, eventName, handler) {
706 var plugin = this._findPluginFor(eventName);
707 return plugin.addEventListener(element, eventName, handler);
708 };
709 /**
710 * Registers a global handler for an event in a target view.
711 *
712 * @param target A target for global event notifications. One of "window", "document", or "body".
713 * @param eventName The name of the event to listen for.
714 * @param handler A function to call when the notification occurs. Receives the
715 * event object as an argument.
716 * @returns A callback function that can be used to remove the handler.
717 */
718 EventManager.prototype.addGlobalEventListener = function (target, eventName, handler) {
719 var plugin = this._findPluginFor(eventName);
720 return plugin.addGlobalEventListener(target, eventName, handler);
721 };
722 /**
723 * Retrieves the compilation zone in which event listeners are registered.
724 */
725 EventManager.prototype.getZone = function () {
726 return this._zone;
727 };
728 /** @internal */
729 EventManager.prototype._findPluginFor = function (eventName) {
730 var plugin = this._eventNameToPlugin.get(eventName);
731 if (plugin) {
732 return plugin;
733 }
734 var plugins = this._plugins;
735 for (var i = 0; i < plugins.length; i++) {
736 var plugin_1 = plugins[i];
737 if (plugin_1.supports(eventName)) {
738 this._eventNameToPlugin.set(eventName, plugin_1);
739 return plugin_1;
740 }
741 }
742 throw new Error("No event manager plugin found for event " + eventName);
743 };
744 return EventManager;
745 }());
746 EventManager.decorators = [
747 { type: i0.Injectable }
748 ];
749 EventManager.ctorParameters = function () { return [
750 { type: Array, decorators: [{ type: i0.Inject, args: [EVENT_MANAGER_PLUGINS,] }] },
751 { type: i0.NgZone }
752 ]; };
753 var EventManagerPlugin = /** @class */ (function () {
754 function EventManagerPlugin(_doc) {
755 this._doc = _doc;
756 }
757 EventManagerPlugin.prototype.addGlobalEventListener = function (element, eventName, handler) {
758 var target = common.ɵgetDOM().getGlobalEventTarget(this._doc, element);
759 if (!target) {
760 throw new Error("Unsupported event target " + target + " for event " + eventName);
761 }
762 return this.addEventListener(target, eventName, handler);
763 };
764 return EventManagerPlugin;
765 }());
766
767 var SharedStylesHost = /** @class */ (function () {
768 function SharedStylesHost() {
769 /** @internal */
770 this._stylesSet = new Set();
771 }
772 SharedStylesHost.prototype.addStyles = function (styles) {
773 var _this = this;
774 var additions = new Set();
775 styles.forEach(function (style) {
776 if (!_this._stylesSet.has(style)) {
777 _this._stylesSet.add(style);
778 additions.add(style);
779 }
780 });
781 this.onStylesAdded(additions);
782 };
783 SharedStylesHost.prototype.onStylesAdded = function (additions) { };
784 SharedStylesHost.prototype.getAllStyles = function () {
785 return Array.from(this._stylesSet);
786 };
787 return SharedStylesHost;
788 }());
789 SharedStylesHost.decorators = [
790 { type: i0.Injectable }
791 ];
792 var DomSharedStylesHost = /** @class */ (function (_super) {
793 __extends(DomSharedStylesHost, _super);
794 function DomSharedStylesHost(_doc) {
795 var _this = _super.call(this) || this;
796 _this._doc = _doc;
797 _this._hostNodes = new Set();
798 _this._styleNodes = new Set();
799 _this._hostNodes.add(_doc.head);
800 return _this;
801 }
802 DomSharedStylesHost.prototype._addStylesToHost = function (styles, host) {
803 var _this = this;
804 styles.forEach(function (style) {
805 var styleEl = _this._doc.createElement('style');
806 styleEl.textContent = style;
807 _this._styleNodes.add(host.appendChild(styleEl));
808 });
809 };
810 DomSharedStylesHost.prototype.addHost = function (hostNode) {
811 this._addStylesToHost(this._stylesSet, hostNode);
812 this._hostNodes.add(hostNode);
813 };
814 DomSharedStylesHost.prototype.removeHost = function (hostNode) {
815 this._hostNodes.delete(hostNode);
816 };
817 DomSharedStylesHost.prototype.onStylesAdded = function (additions) {
818 var _this = this;
819 this._hostNodes.forEach(function (hostNode) { return _this._addStylesToHost(additions, hostNode); });
820 };
821 DomSharedStylesHost.prototype.ngOnDestroy = function () {
822 this._styleNodes.forEach(function (styleNode) { return common.ɵgetDOM().remove(styleNode); });
823 };
824 return DomSharedStylesHost;
825 }(SharedStylesHost));
826 DomSharedStylesHost.decorators = [
827 { type: i0.Injectable }
828 ];
829 DomSharedStylesHost.ctorParameters = function () { return [
830 { type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
831 ]; };
832
833 var NAMESPACE_URIS = {
834 'svg': 'http://www.w3.org/2000/svg',
835 'xhtml': 'http://www.w3.org/1999/xhtml',
836 'xlink': 'http://www.w3.org/1999/xlink',
837 'xml': 'http://www.w3.org/XML/1998/namespace',
838 'xmlns': 'http://www.w3.org/2000/xmlns/',
839 };
840 var COMPONENT_REGEX = /%COMP%/g;
841 var NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;
842 var COMPONENT_VARIABLE = '%COMP%';
843 var HOST_ATTR = "_nghost-" + COMPONENT_VARIABLE;
844 var CONTENT_ATTR = "_ngcontent-" + COMPONENT_VARIABLE;
845 function shimContentAttribute(componentShortId) {
846 return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);
847 }
848 function shimHostAttribute(componentShortId) {
849 return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);
850 }
851 function flattenStyles(compId, styles, target) {
852 for (var i = 0; i < styles.length; i++) {
853 var style = styles[i];
854 if (Array.isArray(style)) {
855 flattenStyles(compId, style, target);
856 }
857 else {
858 style = style.replace(COMPONENT_REGEX, compId);
859 target.push(style);
860 }
861 }
862 return target;
863 }
864 function decoratePreventDefault(eventHandler) {
865 // `DebugNode.triggerEventHandler` needs to know if the listener was created with
866 // decoratePreventDefault or is a listener added outside the Angular context so it can handle the
867 // two differently. In the first case, the special '__ngUnwrap__' token is passed to the unwrap
868 // the listener (see below).
869 return function (event) {
870 // Ivy uses '__ngUnwrap__' as a special token that allows us to unwrap the function
871 // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`. The debug_node
872 // can inspect the listener toString contents for the existence of this special token. Because
873 // the token is a string literal, it is ensured to not be modified by compiled code.
874 if (event === '__ngUnwrap__') {
875 return eventHandler;
876 }
877 var allowDefaultBehavior = eventHandler(event);
878 if (allowDefaultBehavior === false) {
879 // TODO(tbosch): move preventDefault into event plugins...
880 event.preventDefault();
881 event.returnValue = false;
882 }
883 return undefined;
884 };
885 }
886 var DomRendererFactory2 = /** @class */ (function () {
887 function DomRendererFactory2(eventManager, sharedStylesHost, appId) {
888 this.eventManager = eventManager;
889 this.sharedStylesHost = sharedStylesHost;
890 this.appId = appId;
891 this.rendererByCompId = new Map();
892 this.defaultRenderer = new DefaultDomRenderer2(eventManager);
893 }
894 DomRendererFactory2.prototype.createRenderer = function (element, type) {
895 if (!element || !type) {
896 return this.defaultRenderer;
897 }
898 switch (type.encapsulation) {
899 case i0.ViewEncapsulation.Emulated: {
900 var renderer = this.rendererByCompId.get(type.id);
901 if (!renderer) {
902 renderer = new EmulatedEncapsulationDomRenderer2(this.eventManager, this.sharedStylesHost, type, this.appId);
903 this.rendererByCompId.set(type.id, renderer);
904 }
905 renderer.applyToHost(element);
906 return renderer;
907 }
908 case i0.ViewEncapsulation.Native:
909 case i0.ViewEncapsulation.ShadowDom:
910 return new ShadowDomRenderer(this.eventManager, this.sharedStylesHost, element, type);
911 default: {
912 if (!this.rendererByCompId.has(type.id)) {
913 var styles = flattenStyles(type.id, type.styles, []);
914 this.sharedStylesHost.addStyles(styles);
915 this.rendererByCompId.set(type.id, this.defaultRenderer);
916 }
917 return this.defaultRenderer;
918 }
919 }
920 };
921 DomRendererFactory2.prototype.begin = function () { };
922 DomRendererFactory2.prototype.end = function () { };
923 return DomRendererFactory2;
924 }());
925 DomRendererFactory2.decorators = [
926 { type: i0.Injectable }
927 ];
928 DomRendererFactory2.ctorParameters = function () { return [
929 { type: EventManager },
930 { type: DomSharedStylesHost },
931 { type: String, decorators: [{ type: i0.Inject, args: [i0.APP_ID,] }] }
932 ]; };
933 var DefaultDomRenderer2 = /** @class */ (function () {
934 function DefaultDomRenderer2(eventManager) {
935 this.eventManager = eventManager;
936 this.data = Object.create(null);
937 }
938 DefaultDomRenderer2.prototype.destroy = function () { };
939 DefaultDomRenderer2.prototype.createElement = function (name, namespace) {
940 if (namespace) {
941 // In cases where Ivy (not ViewEngine) is giving us the actual namespace, the look up by key
942 // will result in undefined, so we just return the namespace here.
943 return document.createElementNS(NAMESPACE_URIS[namespace] || namespace, name);
944 }
945 return document.createElement(name);
946 };
947 DefaultDomRenderer2.prototype.createComment = function (value) {
948 return document.createComment(value);
949 };
950 DefaultDomRenderer2.prototype.createText = function (value) {
951 return document.createTextNode(value);
952 };
953 DefaultDomRenderer2.prototype.appendChild = function (parent, newChild) {
954 parent.appendChild(newChild);
955 };
956 DefaultDomRenderer2.prototype.insertBefore = function (parent, newChild, refChild) {
957 if (parent) {
958 parent.insertBefore(newChild, refChild);
959 }
960 };
961 DefaultDomRenderer2.prototype.removeChild = function (parent, oldChild) {
962 if (parent) {
963 parent.removeChild(oldChild);
964 }
965 };
966 DefaultDomRenderer2.prototype.selectRootElement = function (selectorOrNode, preserveContent) {
967 var el = typeof selectorOrNode === 'string' ? document.querySelector(selectorOrNode) :
968 selectorOrNode;
969 if (!el) {
970 throw new Error("The selector \"" + selectorOrNode + "\" did not match any elements");
971 }
972 if (!preserveContent) {
973 el.textContent = '';
974 }
975 return el;
976 };
977 DefaultDomRenderer2.prototype.parentNode = function (node) {
978 return node.parentNode;
979 };
980 DefaultDomRenderer2.prototype.nextSibling = function (node) {
981 return node.nextSibling;
982 };
983 DefaultDomRenderer2.prototype.setAttribute = function (el, name, value, namespace) {
984 if (namespace) {
985 name = namespace + ':' + name;
986 // TODO(FW-811): Ivy may cause issues here because it's passing around
987 // full URIs for namespaces, therefore this lookup will fail.
988 var namespaceUri = NAMESPACE_URIS[namespace];
989 if (namespaceUri) {
990 el.setAttributeNS(namespaceUri, name, value);
991 }
992 else {
993 el.setAttribute(name, value);
994 }
995 }
996 else {
997 el.setAttribute(name, value);
998 }
999 };
1000 DefaultDomRenderer2.prototype.removeAttribute = function (el, name, namespace) {
1001 if (namespace) {
1002 // TODO(FW-811): Ivy may cause issues here because it's passing around
1003 // full URIs for namespaces, therefore this lookup will fail.
1004 var namespaceUri = NAMESPACE_URIS[namespace];
1005 if (namespaceUri) {
1006 el.removeAttributeNS(namespaceUri, name);
1007 }
1008 else {
1009 // TODO(FW-811): Since ivy is passing around full URIs for namespaces
1010 // this could result in properties like `http://www.w3.org/2000/svg:cx="123"`,
1011 // which is wrong.
1012 el.removeAttribute(namespace + ":" + name);
1013 }
1014 }
1015 else {
1016 el.removeAttribute(name);
1017 }
1018 };
1019 DefaultDomRenderer2.prototype.addClass = function (el, name) {
1020 el.classList.add(name);
1021 };
1022 DefaultDomRenderer2.prototype.removeClass = function (el, name) {
1023 el.classList.remove(name);
1024 };
1025 DefaultDomRenderer2.prototype.setStyle = function (el, style, value, flags) {
1026 if (flags & i0.RendererStyleFlags2.DashCase) {
1027 el.style.setProperty(style, value, !!(flags & i0.RendererStyleFlags2.Important) ? 'important' : '');
1028 }
1029 else {
1030 el.style[style] = value;
1031 }
1032 };
1033 DefaultDomRenderer2.prototype.removeStyle = function (el, style, flags) {
1034 if (flags & i0.RendererStyleFlags2.DashCase) {
1035 el.style.removeProperty(style);
1036 }
1037 else {
1038 // IE requires '' instead of null
1039 // see https://github.com/angular/angular/issues/7916
1040 el.style[style] = '';
1041 }
1042 };
1043 DefaultDomRenderer2.prototype.setProperty = function (el, name, value) {
1044 NG_DEV_MODE && checkNoSyntheticProp(name, 'property');
1045 el[name] = value;
1046 };
1047 DefaultDomRenderer2.prototype.setValue = function (node, value) {
1048 node.nodeValue = value;
1049 };
1050 DefaultDomRenderer2.prototype.listen = function (target, event, callback) {
1051 NG_DEV_MODE && checkNoSyntheticProp(event, 'listener');
1052 if (typeof target === 'string') {
1053 return this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback));
1054 }
1055 return this.eventManager.addEventListener(target, event, decoratePreventDefault(callback));
1056 };
1057 return DefaultDomRenderer2;
1058 }());
1059 var ɵ0$2 = function () { return '@'.charCodeAt(0); };
1060 var AT_CHARCODE = (ɵ0$2)();
1061 function checkNoSyntheticProp(name, nameKind) {
1062 if (name.charCodeAt(0) === AT_CHARCODE) {
1063 throw new Error("Found the synthetic " + nameKind + " " + name + ". Please include either \"BrowserAnimationsModule\" or \"NoopAnimationsModule\" in your application.");
1064 }
1065 }
1066 var EmulatedEncapsulationDomRenderer2 = /** @class */ (function (_super) {
1067 __extends(EmulatedEncapsulationDomRenderer2, _super);
1068 function EmulatedEncapsulationDomRenderer2(eventManager, sharedStylesHost, component, appId) {
1069 var _this = _super.call(this, eventManager) || this;
1070 _this.component = component;
1071 var styles = flattenStyles(appId + '-' + component.id, component.styles, []);
1072 sharedStylesHost.addStyles(styles);
1073 _this.contentAttr = shimContentAttribute(appId + '-' + component.id);
1074 _this.hostAttr = shimHostAttribute(appId + '-' + component.id);
1075 return _this;
1076 }
1077 EmulatedEncapsulationDomRenderer2.prototype.applyToHost = function (element) {
1078 _super.prototype.setAttribute.call(this, element, this.hostAttr, '');
1079 };
1080 EmulatedEncapsulationDomRenderer2.prototype.createElement = function (parent, name) {
1081 var el = _super.prototype.createElement.call(this, parent, name);
1082 _super.prototype.setAttribute.call(this, el, this.contentAttr, '');
1083 return el;
1084 };
1085 return EmulatedEncapsulationDomRenderer2;
1086 }(DefaultDomRenderer2));
1087 var ShadowDomRenderer = /** @class */ (function (_super) {
1088 __extends(ShadowDomRenderer, _super);
1089 function ShadowDomRenderer(eventManager, sharedStylesHost, hostEl, component) {
1090 var _this = _super.call(this, eventManager) || this;
1091 _this.sharedStylesHost = sharedStylesHost;
1092 _this.hostEl = hostEl;
1093 _this.component = component;
1094 if (component.encapsulation === i0.ViewEncapsulation.ShadowDom) {
1095 _this.shadowRoot = hostEl.attachShadow({ mode: 'open' });
1096 }
1097 else {
1098 _this.shadowRoot = hostEl.createShadowRoot();
1099 }
1100 _this.sharedStylesHost.addHost(_this.shadowRoot);
1101 var styles = flattenStyles(component.id, component.styles, []);
1102 for (var i = 0; i < styles.length; i++) {
1103 var styleEl = document.createElement('style');
1104 styleEl.textContent = styles[i];
1105 _this.shadowRoot.appendChild(styleEl);
1106 }
1107 return _this;
1108 }
1109 ShadowDomRenderer.prototype.nodeOrShadowRoot = function (node) {
1110 return node === this.hostEl ? this.shadowRoot : node;
1111 };
1112 ShadowDomRenderer.prototype.destroy = function () {
1113 this.sharedStylesHost.removeHost(this.shadowRoot);
1114 };
1115 ShadowDomRenderer.prototype.appendChild = function (parent, newChild) {
1116 return _super.prototype.appendChild.call(this, this.nodeOrShadowRoot(parent), newChild);
1117 };
1118 ShadowDomRenderer.prototype.insertBefore = function (parent, newChild, refChild) {
1119 return _super.prototype.insertBefore.call(this, this.nodeOrShadowRoot(parent), newChild, refChild);
1120 };
1121 ShadowDomRenderer.prototype.removeChild = function (parent, oldChild) {
1122 return _super.prototype.removeChild.call(this, this.nodeOrShadowRoot(parent), oldChild);
1123 };
1124 ShadowDomRenderer.prototype.parentNode = function (node) {
1125 return this.nodeOrShadowRoot(_super.prototype.parentNode.call(this, this.nodeOrShadowRoot(node)));
1126 };
1127 return ShadowDomRenderer;
1128 }(DefaultDomRenderer2));
1129
1130 var DomEventsPlugin = /** @class */ (function (_super) {
1131 __extends(DomEventsPlugin, _super);
1132 function DomEventsPlugin(doc) {
1133 return _super.call(this, doc) || this;
1134 }
1135 // This plugin should come last in the list of plugins, because it accepts all
1136 // events.
1137 DomEventsPlugin.prototype.supports = function (eventName) {
1138 return true;
1139 };
1140 DomEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {
1141 var _this = this;
1142 element.addEventListener(eventName, handler, false);
1143 return function () { return _this.removeEventListener(element, eventName, handler); };
1144 };
1145 DomEventsPlugin.prototype.removeEventListener = function (target, eventName, callback) {
1146 return target.removeEventListener(eventName, callback);
1147 };
1148 return DomEventsPlugin;
1149 }(EventManagerPlugin));
1150 DomEventsPlugin.decorators = [
1151 { type: i0.Injectable }
1152 ];
1153 DomEventsPlugin.ctorParameters = function () { return [
1154 { type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
1155 ]; };
1156
1157 /**
1158 * Supported HammerJS recognizer event names.
1159 */
1160 var EVENT_NAMES = {
1161 // pan
1162 'pan': true,
1163 'panstart': true,
1164 'panmove': true,
1165 'panend': true,
1166 'pancancel': true,
1167 'panleft': true,
1168 'panright': true,
1169 'panup': true,
1170 'pandown': true,
1171 // pinch
1172 'pinch': true,
1173 'pinchstart': true,
1174 'pinchmove': true,
1175 'pinchend': true,
1176 'pinchcancel': true,
1177 'pinchin': true,
1178 'pinchout': true,
1179 // press
1180 'press': true,
1181 'pressup': true,
1182 // rotate
1183 'rotate': true,
1184 'rotatestart': true,
1185 'rotatemove': true,
1186 'rotateend': true,
1187 'rotatecancel': true,
1188 // swipe
1189 'swipe': true,
1190 'swipeleft': true,
1191 'swiperight': true,
1192 'swipeup': true,
1193 'swipedown': true,
1194 // tap
1195 'tap': true,
1196 };
1197 /**
1198 * DI token for providing [HammerJS](http://hammerjs.github.io/) support to Angular.
1199 * @see `HammerGestureConfig`
1200 *
1201 * @ngModule HammerModule
1202 * @publicApi
1203 */
1204 var HAMMER_GESTURE_CONFIG = new i0.InjectionToken('HammerGestureConfig');
1205 /**
1206 * Injection token used to provide a {@link HammerLoader} to Angular.
1207 *
1208 * @publicApi
1209 */
1210 var HAMMER_LOADER = new i0.InjectionToken('HammerLoader');
1211 /**
1212 * An injectable [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)
1213 * for gesture recognition. Configures specific event recognition.
1214 * @publicApi
1215 */
1216 var HammerGestureConfig = /** @class */ (function () {
1217 function HammerGestureConfig() {
1218 /**
1219 * A set of supported event names for gestures to be used in Angular.
1220 * Angular supports all built-in recognizers, as listed in
1221 * [HammerJS documentation](http://hammerjs.github.io/).
1222 */
1223 this.events = [];
1224 /**
1225 * Maps gesture event names to a set of configuration options
1226 * that specify overrides to the default values for specific properties.
1227 *
1228 * The key is a supported event name to be configured,
1229 * and the options object contains a set of properties, with override values
1230 * to be applied to the named recognizer event.
1231 * For example, to disable recognition of the rotate event, specify
1232 * `{"rotate": {"enable": false}}`.
1233 *
1234 * Properties that are not present take the HammerJS default values.
1235 * For information about which properties are supported for which events,
1236 * and their allowed and default values, see
1237 * [HammerJS documentation](http://hammerjs.github.io/).
1238 *
1239 */
1240 this.overrides = {};
1241 }
1242 /**
1243 * Creates a [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)
1244 * and attaches it to a given HTML element.
1245 * @param element The element that will recognize gestures.
1246 * @returns A HammerJS event-manager object.
1247 */
1248 HammerGestureConfig.prototype.buildHammer = function (element) {
1249 var mc = new Hammer(element, this.options);
1250 mc.get('pinch').set({ enable: true });
1251 mc.get('rotate').set({ enable: true });
1252 for (var eventName in this.overrides) {
1253 mc.get(eventName).set(this.overrides[eventName]);
1254 }
1255 return mc;
1256 };
1257 return HammerGestureConfig;
1258 }());
1259 HammerGestureConfig.decorators = [
1260 { type: i0.Injectable }
1261 ];
1262 /**
1263 * Event plugin that adds Hammer support to an application.
1264 *
1265 * @ngModule HammerModule
1266 */
1267 var HammerGesturesPlugin = /** @class */ (function (_super) {
1268 __extends(HammerGesturesPlugin, _super);
1269 function HammerGesturesPlugin(doc, _config, console, loader) {
1270 var _this = _super.call(this, doc) || this;
1271 _this._config = _config;
1272 _this.console = console;
1273 _this.loader = loader;
1274 return _this;
1275 }
1276 HammerGesturesPlugin.prototype.supports = function (eventName) {
1277 if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {
1278 return false;
1279 }
1280 if (!window.Hammer && !this.loader) {
1281 this.console.warn("The \"" + eventName + "\" event cannot be bound because Hammer.JS is not " +
1282 "loaded and no custom loader has been specified.");
1283 return false;
1284 }
1285 return true;
1286 };
1287 HammerGesturesPlugin.prototype.addEventListener = function (element, eventName, handler) {
1288 var _this = this;
1289 var zone = this.manager.getZone();
1290 eventName = eventName.toLowerCase();
1291 // If Hammer is not present but a loader is specified, we defer adding the event listener
1292 // until Hammer is loaded.
1293 if (!window.Hammer && this.loader) {
1294 // This `addEventListener` method returns a function to remove the added listener.
1295 // Until Hammer is loaded, the returned function needs to *cancel* the registration rather
1296 // than remove anything.
1297 var cancelRegistration_1 = false;
1298 var deregister_1 = function () {
1299 cancelRegistration_1 = true;
1300 };
1301 this.loader()
1302 .then(function () {
1303 // If Hammer isn't actually loaded when the custom loader resolves, give up.
1304 if (!window.Hammer) {
1305 _this.console.warn("The custom HAMMER_LOADER completed, but Hammer.JS is not present.");
1306 deregister_1 = function () { };
1307 return;
1308 }
1309 if (!cancelRegistration_1) {
1310 // Now that Hammer is loaded and the listener is being loaded for real,
1311 // the deregistration function changes from canceling registration to removal.
1312 deregister_1 = _this.addEventListener(element, eventName, handler);
1313 }
1314 })
1315 .catch(function () {
1316 _this.console.warn("The \"" + eventName + "\" event cannot be bound because the custom " +
1317 "Hammer.JS loader failed.");
1318 deregister_1 = function () { };
1319 });
1320 // Return a function that *executes* `deregister` (and not `deregister` itself) so that we
1321 // can change the behavior of `deregister` once the listener is added. Using a closure in
1322 // this way allows us to avoid any additional data structures to track listener removal.
1323 return function () {
1324 deregister_1();
1325 };
1326 }
1327 return zone.runOutsideAngular(function () {
1328 // Creating the manager bind events, must be done outside of angular
1329 var mc = _this._config.buildHammer(element);
1330 var callback = function (eventObj) {
1331 zone.runGuarded(function () {
1332 handler(eventObj);
1333 });
1334 };
1335 mc.on(eventName, callback);
1336 return function () {
1337 mc.off(eventName, callback);
1338 // destroy mc to prevent memory leak
1339 if (typeof mc.destroy === 'function') {
1340 mc.destroy();
1341 }
1342 };
1343 });
1344 };
1345 HammerGesturesPlugin.prototype.isCustomEvent = function (eventName) {
1346 return this._config.events.indexOf(eventName) > -1;
1347 };
1348 return HammerGesturesPlugin;
1349 }(EventManagerPlugin));
1350 HammerGesturesPlugin.decorators = [
1351 { type: i0.Injectable }
1352 ];
1353 HammerGesturesPlugin.ctorParameters = function () { return [
1354 { type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] },
1355 { type: HammerGestureConfig, decorators: [{ type: i0.Inject, args: [HAMMER_GESTURE_CONFIG,] }] },
1356 { type: i0.ɵConsole },
1357 { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [HAMMER_LOADER,] }] }
1358 ]; };
1359 /**
1360 * In Ivy, support for Hammer gestures is optional, so applications must
1361 * import the `HammerModule` at root to turn on support. This means that
1362 * Hammer-specific code can be tree-shaken away if not needed.
1363 */
1364 var HAMMER_PROVIDERS__POST_R3__ = [];
1365 /**
1366 * In View Engine, support for Hammer gestures is built-in by default.
1367 */
1368 var HAMMER_PROVIDERS__PRE_R3__ = [
1369 {
1370 provide: EVENT_MANAGER_PLUGINS,
1371 useClass: HammerGesturesPlugin,
1372 multi: true,
1373 deps: [common.DOCUMENT, HAMMER_GESTURE_CONFIG, i0.ɵConsole, [new i0.Optional(), HAMMER_LOADER]]
1374 },
1375 { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: [] },
1376 ];
1377 var HAMMER_PROVIDERS = HAMMER_PROVIDERS__PRE_R3__;
1378 /**
1379 * Adds support for HammerJS.
1380 *
1381 * Import this module at the root of your application so that Angular can work with
1382 * HammerJS to detect gesture events.
1383 *
1384 * Note that applications still need to include the HammerJS script itself. This module
1385 * simply sets up the coordination layer between HammerJS and Angular's EventManager.
1386 *
1387 * @publicApi
1388 */
1389 var HammerModule = /** @class */ (function () {
1390 function HammerModule() {
1391 }
1392 return HammerModule;
1393 }());
1394 HammerModule.decorators = [
1395 { type: i0.NgModule, args: [{ providers: HAMMER_PROVIDERS__PRE_R3__ },] }
1396 ];
1397
1398 /**
1399 * Defines supported modifiers for key events.
1400 */
1401 var MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];
1402 var DOM_KEY_LOCATION_NUMPAD = 3;
1403 // Map to convert some key or keyIdentifier values to what will be returned by getEventKey
1404 var _keyMap = {
1405 // The following values are here for cross-browser compatibility and to match the W3C standard
1406 // cf http://www.w3.org/TR/DOM-Level-3-Events-key/
1407 '\b': 'Backspace',
1408 '\t': 'Tab',
1409 '\x7F': 'Delete',
1410 '\x1B': 'Escape',
1411 'Del': 'Delete',
1412 'Esc': 'Escape',
1413 'Left': 'ArrowLeft',
1414 'Right': 'ArrowRight',
1415 'Up': 'ArrowUp',
1416 'Down': 'ArrowDown',
1417 'Menu': 'ContextMenu',
1418 'Scroll': 'ScrollLock',
1419 'Win': 'OS'
1420 };
1421 // There is a bug in Chrome for numeric keypad keys:
1422 // https://code.google.com/p/chromium/issues/detail?id=155654
1423 // 1, 2, 3 ... are reported as A, B, C ...
1424 var _chromeNumKeyPadMap = {
1425 'A': '1',
1426 'B': '2',
1427 'C': '3',
1428 'D': '4',
1429 'E': '5',
1430 'F': '6',
1431 'G': '7',
1432 'H': '8',
1433 'I': '9',
1434 'J': '*',
1435 'K': '+',
1436 'M': '-',
1437 'N': '.',
1438 'O': '/',
1439 '\x60': '0',
1440 '\x90': 'NumLock'
1441 };
1442 var ɵ0$3 = function (event) { return event.altKey; }, ɵ1 = function (event) { return event.ctrlKey; }, ɵ2 = function (event) { return event.metaKey; }, ɵ3 = function (event) { return event.shiftKey; };
1443 /**
1444 * Retrieves modifiers from key-event objects.
1445 */
1446 var MODIFIER_KEY_GETTERS = {
1447 'alt': ɵ0$3,
1448 'control': ɵ1,
1449 'meta': ɵ2,
1450 'shift': ɵ3
1451 };
1452 /**
1453 * @publicApi
1454 * A browser plug-in that provides support for handling of key events in Angular.
1455 */
1456 var KeyEventsPlugin = /** @class */ (function (_super) {
1457 __extends(KeyEventsPlugin, _super);
1458 /**
1459 * Initializes an instance of the browser plug-in.
1460 * @param doc The document in which key events will be detected.
1461 */
1462 function KeyEventsPlugin(doc) {
1463 return _super.call(this, doc) || this;
1464 }
1465 /**
1466 * Reports whether a named key event is supported.
1467 * @param eventName The event name to query.
1468 * @return True if the named key event is supported.
1469 */
1470 KeyEventsPlugin.prototype.supports = function (eventName) {
1471 return KeyEventsPlugin.parseEventName(eventName) != null;
1472 };
1473 /**
1474 * Registers a handler for a specific element and key event.
1475 * @param element The HTML element to receive event notifications.
1476 * @param eventName The name of the key event to listen for.
1477 * @param handler A function to call when the notification occurs. Receives the
1478 * event object as an argument.
1479 * @returns The key event that was registered.
1480 */
1481 KeyEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {
1482 var parsedEvent = KeyEventsPlugin.parseEventName(eventName);
1483 var outsideHandler = KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());
1484 return this.manager.getZone().runOutsideAngular(function () {
1485 return common.ɵgetDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler);
1486 });
1487 };
1488 KeyEventsPlugin.parseEventName = function (eventName) {
1489 var parts = eventName.toLowerCase().split('.');
1490 var domEventName = parts.shift();
1491 if ((parts.length === 0) || !(domEventName === 'keydown' || domEventName === 'keyup')) {
1492 return null;
1493 }
1494 var key = KeyEventsPlugin._normalizeKey(parts.pop());
1495 var fullKey = '';
1496 MODIFIER_KEYS.forEach(function (modifierName) {
1497 var index = parts.indexOf(modifierName);
1498 if (index > -1) {
1499 parts.splice(index, 1);
1500 fullKey += modifierName + '.';
1501 }
1502 });
1503 fullKey += key;
1504 if (parts.length != 0 || key.length === 0) {
1505 // returning null instead of throwing to let another plugin process the event
1506 return null;
1507 }
1508 // NOTE: Please don't rewrite this as so, as it will break JSCompiler property renaming.
1509 // The code must remain in the `result['domEventName']` form.
1510 // return {domEventName, fullKey};
1511 var result = {};
1512 result['domEventName'] = domEventName;
1513 result['fullKey'] = fullKey;
1514 return result;
1515 };
1516 KeyEventsPlugin.getEventFullKey = function (event) {
1517 var fullKey = '';
1518 var key = getEventKey(event);
1519 key = key.toLowerCase();
1520 if (key === ' ') {
1521 key = 'space'; // for readability
1522 }
1523 else if (key === '.') {
1524 key = 'dot'; // because '.' is used as a separator in event names
1525 }
1526 MODIFIER_KEYS.forEach(function (modifierName) {
1527 if (modifierName != key) {
1528 var modifierGetter = MODIFIER_KEY_GETTERS[modifierName];
1529 if (modifierGetter(event)) {
1530 fullKey += modifierName + '.';
1531 }
1532 }
1533 });
1534 fullKey += key;
1535 return fullKey;
1536 };
1537 /**
1538 * Configures a handler callback for a key event.
1539 * @param fullKey The event name that combines all simultaneous keystrokes.
1540 * @param handler The function that responds to the key event.
1541 * @param zone The zone in which the event occurred.
1542 * @returns A callback function.
1543 */
1544 KeyEventsPlugin.eventCallback = function (fullKey, handler, zone) {
1545 return function (event /** TODO #9100 */) {
1546 if (KeyEventsPlugin.getEventFullKey(event) === fullKey) {
1547 zone.runGuarded(function () { return handler(event); });
1548 }
1549 };
1550 };
1551 /** @internal */
1552 KeyEventsPlugin._normalizeKey = function (keyName) {
1553 // TODO: switch to a Map if the mapping grows too much
1554 switch (keyName) {
1555 case 'esc':
1556 return 'escape';
1557 default:
1558 return keyName;
1559 }
1560 };
1561 return KeyEventsPlugin;
1562 }(EventManagerPlugin));
1563 KeyEventsPlugin.decorators = [
1564 { type: i0.Injectable }
1565 ];
1566 KeyEventsPlugin.ctorParameters = function () { return [
1567 { type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
1568 ]; };
1569 function getEventKey(event) {
1570 var key = event.key;
1571 if (key == null) {
1572 key = event.keyIdentifier;
1573 // keyIdentifier is defined in the old draft of DOM Level 3 Events implemented by Chrome and
1574 // Safari cf
1575 // http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/events.html#Events-KeyboardEvents-Interfaces
1576 if (key == null) {
1577 return 'Unidentified';
1578 }
1579 if (key.startsWith('U+')) {
1580 key = String.fromCharCode(parseInt(key.substring(2), 16));
1581 if (event.location === DOM_KEY_LOCATION_NUMPAD && _chromeNumKeyPadMap.hasOwnProperty(key)) {
1582 // There is a bug in Chrome for numeric keypad keys:
1583 // https://code.google.com/p/chromium/issues/detail?id=155654
1584 // 1, 2, 3 ... are reported as A, B, C ...
1585 key = _chromeNumKeyPadMap[key];
1586 }
1587 }
1588 }
1589 return _keyMap[key] || key;
1590 }
1591
1592 /**
1593 * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing
1594 * values to be safe to use in the different DOM contexts.
1595 *
1596 * For example, when binding a URL in an `<a [href]="someValue">` hyperlink, `someValue` will be
1597 * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on
1598 * the website.
1599 *
1600 * In specific situations, it might be necessary to disable sanitization, for example if the
1601 * application genuinely needs to produce a `javascript:` style link with a dynamic value in it.
1602 * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...`
1603 * methods, and then binding to that value from the template.
1604 *
1605 * These situations should be very rare, and extraordinary care must be taken to avoid creating a
1606 * Cross Site Scripting (XSS) security bug!
1607 *
1608 * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as
1609 * close as possible to the source of the value, to make it easy to verify no security bug is
1610 * created by its use.
1611 *
1612 * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that
1613 * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous
1614 * code. The sanitizer leaves safe values intact.
1615 *
1616 * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in
1617 * sanitization for the value passed in. Carefully check and audit all values and code paths going
1618 * into this call. Make sure any user data is appropriately escaped for this security context.
1619 * For more detail, see the [Security Guide](http://g.co/ng/security).
1620 *
1621 * @publicApi
1622 */
1623 var DomSanitizer = /** @class */ (function () {
1624 function DomSanitizer() {
1625 }
1626 return DomSanitizer;
1627 }());
1628 DomSanitizer.ɵprov = i0.ɵɵdefineInjectable({ factory: function DomSanitizer_Factory() { return i0.ɵɵinject(DomSanitizerImpl); }, token: DomSanitizer, providedIn: "root" });
1629 DomSanitizer.decorators = [
1630 { type: i0.Injectable, args: [{ providedIn: 'root', useExisting: i0.forwardRef(function () { return DomSanitizerImpl; }) },] }
1631 ];
1632 function domSanitizerImplFactory(injector) {
1633 return new DomSanitizerImpl(injector.get(common.DOCUMENT));
1634 }
1635 var DomSanitizerImpl = /** @class */ (function (_super) {
1636 __extends(DomSanitizerImpl, _super);
1637 function DomSanitizerImpl(_doc) {
1638 var _this = _super.call(this) || this;
1639 _this._doc = _doc;
1640 return _this;
1641 }
1642 DomSanitizerImpl.prototype.sanitize = function (ctx, value) {
1643 if (value == null)
1644 return null;
1645 switch (ctx) {
1646 case i0.SecurityContext.NONE:
1647 return value;
1648 case i0.SecurityContext.HTML:
1649 if (i0.ɵallowSanitizationBypassAndThrow(value, "HTML" /* Html */)) {
1650 return i0.ɵunwrapSafeValue(value);
1651 }
1652 return i0.ɵ_sanitizeHtml(this._doc, String(value));
1653 case i0.SecurityContext.STYLE:
1654 if (i0.ɵallowSanitizationBypassAndThrow(value, "Style" /* Style */)) {
1655 return i0.ɵunwrapSafeValue(value);
1656 }
1657 return value;
1658 case i0.SecurityContext.SCRIPT:
1659 if (i0.ɵallowSanitizationBypassAndThrow(value, "Script" /* Script */)) {
1660 return i0.ɵunwrapSafeValue(value);
1661 }
1662 throw new Error('unsafe value used in a script context');
1663 case i0.SecurityContext.URL:
1664 var type = i0.ɵgetSanitizationBypassType(value);
1665 if (i0.ɵallowSanitizationBypassAndThrow(value, "URL" /* Url */)) {
1666 return i0.ɵunwrapSafeValue(value);
1667 }
1668 return i0.ɵ_sanitizeUrl(String(value));
1669 case i0.SecurityContext.RESOURCE_URL:
1670 if (i0.ɵallowSanitizationBypassAndThrow(value, "ResourceURL" /* ResourceUrl */)) {
1671 return i0.ɵunwrapSafeValue(value);
1672 }
1673 throw new Error('unsafe value used in a resource URL context (see http://g.co/ng/security#xss)');
1674 default:
1675 throw new Error("Unexpected SecurityContext " + ctx + " (see http://g.co/ng/security#xss)");
1676 }
1677 };
1678 DomSanitizerImpl.prototype.bypassSecurityTrustHtml = function (value) {
1679 return i0.ɵbypassSanitizationTrustHtml(value);
1680 };
1681 DomSanitizerImpl.prototype.bypassSecurityTrustStyle = function (value) {
1682 return i0.ɵbypassSanitizationTrustStyle(value);
1683 };
1684 DomSanitizerImpl.prototype.bypassSecurityTrustScript = function (value) {
1685 return i0.ɵbypassSanitizationTrustScript(value);
1686 };
1687 DomSanitizerImpl.prototype.bypassSecurityTrustUrl = function (value) {
1688 return i0.ɵbypassSanitizationTrustUrl(value);
1689 };
1690 DomSanitizerImpl.prototype.bypassSecurityTrustResourceUrl = function (value) {
1691 return i0.ɵbypassSanitizationTrustResourceUrl(value);
1692 };
1693 return DomSanitizerImpl;
1694 }(DomSanitizer));
1695 DomSanitizerImpl.ɵprov = i0.ɵɵdefineInjectable({ factory: function DomSanitizerImpl_Factory() { return domSanitizerImplFactory(i0.ɵɵinject(i0.INJECTOR)); }, token: DomSanitizerImpl, providedIn: "root" });
1696 DomSanitizerImpl.decorators = [
1697 { type: i0.Injectable, args: [{ providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [i0.Injector] },] }
1698 ];
1699 DomSanitizerImpl.ctorParameters = function () { return [
1700 { type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
1701 ]; };
1702
1703 /**
1704 * @license
1705 * Copyright Google LLC All Rights Reserved.
1706 *
1707 * Use of this source code is governed by an MIT-style license that can be
1708 * found in the LICENSE file at https://angular.io/license
1709 */
1710 function initDomAdapter() {
1711 BrowserDomAdapter.makeCurrent();
1712 BrowserGetTestability.init();
1713 }
1714 function errorHandler() {
1715 return new i0.ErrorHandler();
1716 }
1717 function _document() {
1718 // Tell ivy about the global document
1719 i0.ɵsetDocument(document);
1720 return document;
1721 }
1722 var ɵ0$4 = common.ɵPLATFORM_BROWSER_ID;
1723 var INTERNAL_BROWSER_PLATFORM_PROVIDERS = [
1724 { provide: i0.PLATFORM_ID, useValue: ɵ0$4 },
1725 { provide: i0.PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true },
1726 { provide: common.DOCUMENT, useFactory: _document, deps: [] },
1727 ];
1728 var BROWSER_SANITIZATION_PROVIDERS__PRE_R3__ = [
1729 { provide: i0.Sanitizer, useExisting: DomSanitizer },
1730 { provide: DomSanitizer, useClass: DomSanitizerImpl, deps: [common.DOCUMENT] },
1731 ];
1732 var BROWSER_SANITIZATION_PROVIDERS__POST_R3__ = [];
1733 /**
1734 * @security Replacing built-in sanitization providers exposes the application to XSS risks.
1735 * Attacker-controlled data introduced by an unsanitized provider could expose your
1736 * application to XSS risks. For more detail, see the [Security Guide](http://g.co/ng/security).
1737 * @publicApi
1738 */
1739 var BROWSER_SANITIZATION_PROVIDERS = BROWSER_SANITIZATION_PROVIDERS__PRE_R3__;
1740 /**
1741 * A factory function that returns a `PlatformRef` instance associated with browser service
1742 * providers.
1743 *
1744 * @publicApi
1745 */
1746 var platformBrowser = i0.createPlatformFactory(i0.platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);
1747 var BROWSER_MODULE_PROVIDERS = [
1748 BROWSER_SANITIZATION_PROVIDERS,
1749 { provide: i0.ɵINJECTOR_SCOPE, useValue: 'root' },
1750 { provide: i0.ErrorHandler, useFactory: errorHandler, deps: [] },
1751 {
1752 provide: EVENT_MANAGER_PLUGINS,
1753 useClass: DomEventsPlugin,
1754 multi: true,
1755 deps: [common.DOCUMENT, i0.NgZone, i0.PLATFORM_ID]
1756 },
1757 { provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true, deps: [common.DOCUMENT] },
1758 HAMMER_PROVIDERS,
1759 {
1760 provide: DomRendererFactory2,
1761 useClass: DomRendererFactory2,
1762 deps: [EventManager, DomSharedStylesHost, i0.APP_ID]
1763 },
1764 { provide: i0.RendererFactory2, useExisting: DomRendererFactory2 },
1765 { provide: SharedStylesHost, useExisting: DomSharedStylesHost },
1766 { provide: DomSharedStylesHost, useClass: DomSharedStylesHost, deps: [common.DOCUMENT] },
1767 { provide: i0.Testability, useClass: i0.Testability, deps: [i0.NgZone] },
1768 { provide: EventManager, useClass: EventManager, deps: [EVENT_MANAGER_PLUGINS, i0.NgZone] },
1769 ELEMENT_PROBE_PROVIDERS,
1770 ];
1771 /**
1772 * Exports required infrastructure for all Angular apps.
1773 * Included by default in all Angular apps created with the CLI
1774 * `new` command.
1775 * Re-exports `CommonModule` and `ApplicationModule`, making their
1776 * exports and providers available to all apps.
1777 *
1778 * @publicApi
1779 */
1780 var BrowserModule = /** @class */ (function () {
1781 function BrowserModule(parentModule) {
1782 if (parentModule) {
1783 throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.");
1784 }
1785 }
1786 /**
1787 * Configures a browser-based app to transition from a server-rendered app, if
1788 * one is present on the page.
1789 *
1790 * @param params An object containing an identifier for the app to transition.
1791 * The ID must match between the client and server versions of the app.
1792 * @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.
1793 */
1794 BrowserModule.withServerTransition = function (params) {
1795 return {
1796 ngModule: BrowserModule,
1797 providers: [
1798 { provide: i0.APP_ID, useValue: params.appId },
1799 { provide: TRANSITION_ID, useExisting: i0.APP_ID },
1800 SERVER_TRANSITION_PROVIDERS,
1801 ],
1802 };
1803 };
1804 return BrowserModule;
1805 }());
1806 BrowserModule.decorators = [
1807 { type: i0.NgModule, args: [{ providers: BROWSER_MODULE_PROVIDERS, exports: [common.CommonModule, i0.ApplicationModule] },] }
1808 ];
1809 BrowserModule.ctorParameters = function () { return [
1810 { type: BrowserModule, decorators: [{ type: i0.Optional }, { type: i0.SkipSelf }, { type: i0.Inject, args: [BrowserModule,] }] }
1811 ]; };
1812
1813 /**
1814 * @license
1815 * Copyright Google LLC All Rights Reserved.
1816 *
1817 * Use of this source code is governed by an MIT-style license that can be
1818 * found in the LICENSE file at https://angular.io/license
1819 */
1820 /**
1821 * Factory to create a `Meta` service instance for the current DOM document.
1822 */
1823 function createMeta() {
1824 return new Meta(i0.ɵɵinject(common.DOCUMENT));
1825 }
1826 /**
1827 * A service for managing HTML `<meta>` tags.
1828 *
1829 * Properties of the `MetaDefinition` object match the attributes of the
1830 * HTML `<meta>` tag. These tags define document metadata that is important for
1831 * things like configuring a Content Security Policy, defining browser compatibility
1832 * and security settings, setting HTTP Headers, defining rich content for social sharing,
1833 * and Search Engine Optimization (SEO).
1834 *
1835 * To identify specific `<meta>` tags in a document, use an attribute selection
1836 * string in the format `"tag_attribute='value string'"`.
1837 * For example, an `attrSelector` value of `"name='description'"` matches a tag
1838 * whose `name` attribute has the value `"description"`.
1839 * Selectors are used with the `querySelector()` Document method,
1840 * in the format `meta[{attrSelector}]`.
1841 *
1842 * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)
1843 * @see [Document.querySelector()](https://developer.mozilla.org/docs/Web/API/Document/querySelector)
1844 *
1845 *
1846 * @publicApi
1847 */
1848 var Meta = /** @class */ (function () {
1849 function Meta(_doc) {
1850 this._doc = _doc;
1851 this._dom = common.ɵgetDOM();
1852 }
1853 /**
1854 * Retrieves or creates a specific `<meta>` tag element in the current HTML document.
1855 * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute
1856 * values in the provided tag definition, and verifies that all other attribute values are equal.
1857 * If an existing element is found, it is returned and is not modified in any way.
1858 * @param tag The definition of a `<meta>` element to match or create.
1859 * @param forceCreation True to create a new element without checking whether one already exists.
1860 * @returns The existing element with the same attributes and values if found,
1861 * the new element if no match is found, or `null` if the tag parameter is not defined.
1862 */
1863 Meta.prototype.addTag = function (tag, forceCreation) {
1864 if (forceCreation === void 0) { forceCreation = false; }
1865 if (!tag)
1866 return null;
1867 return this._getOrCreateElement(tag, forceCreation);
1868 };
1869 /**
1870 * Retrieves or creates a set of `<meta>` tag elements in the current HTML document.
1871 * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute
1872 * values in the provided tag definition, and verifies that all other attribute values are equal.
1873 * @param tags An array of tag definitions to match or create.
1874 * @param forceCreation True to create new elements without checking whether they already exist.
1875 * @returns The matching elements if found, or the new elements.
1876 */
1877 Meta.prototype.addTags = function (tags, forceCreation) {
1878 var _this = this;
1879 if (forceCreation === void 0) { forceCreation = false; }
1880 if (!tags)
1881 return [];
1882 return tags.reduce(function (result, tag) {
1883 if (tag) {
1884 result.push(_this._getOrCreateElement(tag, forceCreation));
1885 }
1886 return result;
1887 }, []);
1888 };
1889 /**
1890 * Retrieves a `<meta>` tag element in the current HTML document.
1891 * @param attrSelector The tag attribute and value to match against, in the format
1892 * `"tag_attribute='value string'"`.
1893 * @returns The matching element, if any.
1894 */
1895 Meta.prototype.getTag = function (attrSelector) {
1896 if (!attrSelector)
1897 return null;
1898 return this._doc.querySelector("meta[" + attrSelector + "]") || null;
1899 };
1900 /**
1901 * Retrieves a set of `<meta>` tag elements in the current HTML document.
1902 * @param attrSelector The tag attribute and value to match against, in the format
1903 * `"tag_attribute='value string'"`.
1904 * @returns The matching elements, if any.
1905 */
1906 Meta.prototype.getTags = function (attrSelector) {
1907 if (!attrSelector)
1908 return [];
1909 var list /*NodeList*/ = this._doc.querySelectorAll("meta[" + attrSelector + "]");
1910 return list ? [].slice.call(list) : [];
1911 };
1912 /**
1913 * Modifies an existing `<meta>` tag element in the current HTML document.
1914 * @param tag The tag description with which to replace the existing tag content.
1915 * @param selector A tag attribute and value to match against, to identify
1916 * an existing tag. A string in the format `"tag_attribute=`value string`"`.
1917 * If not supplied, matches a tag with the same `name` or `property` attribute value as the
1918 * replacement tag.
1919 * @return The modified element.
1920 */
1921 Meta.prototype.updateTag = function (tag, selector) {
1922 if (!tag)
1923 return null;
1924 selector = selector || this._parseSelector(tag);
1925 var meta = this.getTag(selector);
1926 if (meta) {
1927 return this._setMetaElementAttributes(tag, meta);
1928 }
1929 return this._getOrCreateElement(tag, true);
1930 };
1931 /**
1932 * Removes an existing `<meta>` tag element from the current HTML document.
1933 * @param attrSelector A tag attribute and value to match against, to identify
1934 * an existing tag. A string in the format `"tag_attribute=`value string`"`.
1935 */
1936 Meta.prototype.removeTag = function (attrSelector) {
1937 this.removeTagElement(this.getTag(attrSelector));
1938 };
1939 /**
1940 * Removes an existing `<meta>` tag element from the current HTML document.
1941 * @param meta The tag definition to match against to identify an existing tag.
1942 */
1943 Meta.prototype.removeTagElement = function (meta) {
1944 if (meta) {
1945 this._dom.remove(meta);
1946 }
1947 };
1948 Meta.prototype._getOrCreateElement = function (meta, forceCreation) {
1949 if (forceCreation === void 0) { forceCreation = false; }
1950 if (!forceCreation) {
1951 var selector = this._parseSelector(meta);
1952 var elem = this.getTag(selector);
1953 // It's allowed to have multiple elements with the same name so it's not enough to
1954 // just check that element with the same name already present on the page. We also need to
1955 // check if element has tag attributes
1956 if (elem && this._containsAttributes(meta, elem))
1957 return elem;
1958 }
1959 var element = this._dom.createElement('meta');
1960 this._setMetaElementAttributes(meta, element);
1961 var head = this._doc.getElementsByTagName('head')[0];
1962 head.appendChild(element);
1963 return element;
1964 };
1965 Meta.prototype._setMetaElementAttributes = function (tag, el) {
1966 Object.keys(tag).forEach(function (prop) { return el.setAttribute(prop, tag[prop]); });
1967 return el;
1968 };
1969 Meta.prototype._parseSelector = function (tag) {
1970 var attr = tag.name ? 'name' : 'property';
1971 return attr + "=\"" + tag[attr] + "\"";
1972 };
1973 Meta.prototype._containsAttributes = function (tag, elem) {
1974 return Object.keys(tag).every(function (key) { return elem.getAttribute(key) === tag[key]; });
1975 };
1976 return Meta;
1977 }());
1978 Meta.ɵprov = i0.ɵɵdefineInjectable({ factory: createMeta, token: Meta, providedIn: "root" });
1979 Meta.decorators = [
1980 { type: i0.Injectable, args: [{ providedIn: 'root', useFactory: createMeta, deps: [] },] }
1981 ];
1982 Meta.ctorParameters = function () { return [
1983 { type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
1984 ]; };
1985
1986 /**
1987 * @license
1988 * Copyright Google LLC All Rights Reserved.
1989 *
1990 * Use of this source code is governed by an MIT-style license that can be
1991 * found in the LICENSE file at https://angular.io/license
1992 */
1993 /**
1994 * Factory to create Title service.
1995 */
1996 function createTitle() {
1997 return new Title(i0.ɵɵinject(common.DOCUMENT));
1998 }
1999 /**
2000 * A service that can be used to get and set the title of a current HTML document.
2001 *
2002 * Since an Angular application can't be bootstrapped on the entire HTML document (`<html>` tag)
2003 * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements
2004 * (representing the `<title>` tag). Instead, this service can be used to set and get the current
2005 * title value.
2006 *
2007 * @publicApi
2008 */
2009 var Title = /** @class */ (function () {
2010 function Title(_doc) {
2011 this._doc = _doc;
2012 }
2013 /**
2014 * Get the title of the current HTML document.
2015 */
2016 Title.prototype.getTitle = function () {
2017 return this._doc.title;
2018 };
2019 /**
2020 * Set the title of the current HTML document.
2021 * @param newTitle
2022 */
2023 Title.prototype.setTitle = function (newTitle) {
2024 this._doc.title = newTitle || '';
2025 };
2026 return Title;
2027 }());
2028 Title.ɵprov = i0.ɵɵdefineInjectable({ factory: createTitle, token: Title, providedIn: "root" });
2029 Title.decorators = [
2030 { type: i0.Injectable, args: [{ providedIn: 'root', useFactory: createTitle, deps: [] },] }
2031 ];
2032 Title.ctorParameters = function () { return [
2033 { type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
2034 ]; };
2035
2036 /**
2037 * @license
2038 * Copyright Google LLC All Rights Reserved.
2039 *
2040 * Use of this source code is governed by an MIT-style license that can be
2041 * found in the LICENSE file at https://angular.io/license
2042 */
2043 var win = typeof window !== 'undefined' && window || {};
2044
2045 /**
2046 * @license
2047 * Copyright Google LLC All Rights Reserved.
2048 *
2049 * Use of this source code is governed by an MIT-style license that can be
2050 * found in the LICENSE file at https://angular.io/license
2051 */
2052 var ChangeDetectionPerfRecord = /** @class */ (function () {
2053 function ChangeDetectionPerfRecord(msPerTick, numTicks) {
2054 this.msPerTick = msPerTick;
2055 this.numTicks = numTicks;
2056 }
2057 return ChangeDetectionPerfRecord;
2058 }());
2059 /**
2060 * Entry point for all Angular profiling-related debug tools. This object
2061 * corresponds to the `ng.profiler` in the dev console.
2062 */
2063 var AngularProfiler = /** @class */ (function () {
2064 function AngularProfiler(ref) {
2065 this.appRef = ref.injector.get(i0.ApplicationRef);
2066 }
2067 // tslint:disable:no-console
2068 /**
2069 * Exercises change detection in a loop and then prints the average amount of
2070 * time in milliseconds how long a single round of change detection takes for
2071 * the current state of the UI. It runs a minimum of 5 rounds for a minimum
2072 * of 500 milliseconds.
2073 *
2074 * Optionally, a user may pass a `config` parameter containing a map of
2075 * options. Supported options are:
2076 *
2077 * `record` (boolean) - causes the profiler to record a CPU profile while
2078 * it exercises the change detector. Example:
2079 *
2080 * ```
2081 * ng.profiler.timeChangeDetection({record: true})
2082 * ```
2083 */
2084 AngularProfiler.prototype.timeChangeDetection = function (config) {
2085 var record = config && config['record'];
2086 var profileName = 'Change Detection';
2087 // Profiler is not available in Android browsers, nor in IE 9 without dev tools opened
2088 var isProfilerAvailable = win.console.profile != null;
2089 if (record && isProfilerAvailable) {
2090 win.console.profile(profileName);
2091 }
2092 var start = common.ɵgetDOM().performanceNow();
2093 var numTicks = 0;
2094 while (numTicks < 5 || (common.ɵgetDOM().performanceNow() - start) < 500) {
2095 this.appRef.tick();
2096 numTicks++;
2097 }
2098 var end = common.ɵgetDOM().performanceNow();
2099 if (record && isProfilerAvailable) {
2100 win.console.profileEnd(profileName);
2101 }
2102 var msPerTick = (end - start) / numTicks;
2103 win.console.log("ran " + numTicks + " change detection cycles");
2104 win.console.log(msPerTick.toFixed(2) + " ms per check");
2105 return new ChangeDetectionPerfRecord(msPerTick, numTicks);
2106 };
2107 return AngularProfiler;
2108 }());
2109
2110 /**
2111 * @license
2112 * Copyright Google LLC All Rights Reserved.
2113 *
2114 * Use of this source code is governed by an MIT-style license that can be
2115 * found in the LICENSE file at https://angular.io/license
2116 */
2117 var PROFILER_GLOBAL_NAME = 'profiler';
2118 /**
2119 * Enabled Angular debug tools that are accessible via your browser's
2120 * developer console.
2121 *
2122 * Usage:
2123 *
2124 * 1. Open developer console (e.g. in Chrome Ctrl + Shift + j)
2125 * 1. Type `ng.` (usually the console will show auto-complete suggestion)
2126 * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()`
2127 * then hit Enter.
2128 *
2129 * @publicApi
2130 */
2131 function enableDebugTools(ref) {
2132 exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));
2133 return ref;
2134 }
2135 /**
2136 * Disables Angular tools.
2137 *
2138 * @publicApi
2139 */
2140 function disableDebugTools() {
2141 exportNgVar(PROFILER_GLOBAL_NAME, null);
2142 }
2143
2144 /**
2145 * @license
2146 * Copyright Google LLC All Rights Reserved.
2147 *
2148 * Use of this source code is governed by an MIT-style license that can be
2149 * found in the LICENSE file at https://angular.io/license
2150 */
2151 function escapeHtml(text) {
2152 var escapedText = {
2153 '&': '&a;',
2154 '"': '&q;',
2155 '\'': '&s;',
2156 '<': '&l;',
2157 '>': '&g;',
2158 };
2159 return text.replace(/[&"'<>]/g, function (s) { return escapedText[s]; });
2160 }
2161 function unescapeHtml(text) {
2162 var unescapedText = {
2163 '&a;': '&',
2164 '&q;': '"',
2165 '&s;': '\'',
2166 '&l;': '<',
2167 '&g;': '>',
2168 };
2169 return text.replace(/&[^;]+;/g, function (s) { return unescapedText[s]; });
2170 }
2171 /**
2172 * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.
2173 *
2174 * Example:
2175 *
2176 * ```
2177 * const COUNTER_KEY = makeStateKey<number>('counter');
2178 * let value = 10;
2179 *
2180 * transferState.set(COUNTER_KEY, value);
2181 * ```
2182 *
2183 * @publicApi
2184 */
2185 function makeStateKey(key) {
2186 return key;
2187 }
2188 /**
2189 * A key value store that is transferred from the application on the server side to the application
2190 * on the client side.
2191 *
2192 * `TransferState` will be available as an injectable token. To use it import
2193 * `ServerTransferStateModule` on the server and `BrowserTransferStateModule` on the client.
2194 *
2195 * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only
2196 * boolean, number, string, null and non-class objects will be serialized and deserialzied in a
2197 * non-lossy manner.
2198 *
2199 * @publicApi
2200 */
2201 var TransferState = /** @class */ (function () {
2202 function TransferState() {
2203 this.store = {};
2204 this.onSerializeCallbacks = {};
2205 }
2206 /** @internal */
2207 TransferState.init = function (initState) {
2208 var transferState = new TransferState();
2209 transferState.store = initState;
2210 return transferState;
2211 };
2212 /**
2213 * Get the value corresponding to a key. Return `defaultValue` if key is not found.
2214 */
2215 TransferState.prototype.get = function (key, defaultValue) {
2216 return this.store[key] !== undefined ? this.store[key] : defaultValue;
2217 };
2218 /**
2219 * Set the value corresponding to a key.
2220 */
2221 TransferState.prototype.set = function (key, value) {
2222 this.store[key] = value;
2223 };
2224 /**
2225 * Remove a key from the store.
2226 */
2227 TransferState.prototype.remove = function (key) {
2228 delete this.store[key];
2229 };
2230 /**
2231 * Test whether a key exists in the store.
2232 */
2233 TransferState.prototype.hasKey = function (key) {
2234 return this.store.hasOwnProperty(key);
2235 };
2236 /**
2237 * Register a callback to provide the value for a key when `toJson` is called.
2238 */
2239 TransferState.prototype.onSerialize = function (key, callback) {
2240 this.onSerializeCallbacks[key] = callback;
2241 };
2242 /**
2243 * Serialize the current state of the store to JSON.
2244 */
2245 TransferState.prototype.toJson = function () {
2246 // Call the onSerialize callbacks and put those values into the store.
2247 for (var key in this.onSerializeCallbacks) {
2248 if (this.onSerializeCallbacks.hasOwnProperty(key)) {
2249 try {
2250 this.store[key] = this.onSerializeCallbacks[key]();
2251 }
2252 catch (e) {
2253 console.warn('Exception in onSerialize callback: ', e);
2254 }
2255 }
2256 }
2257 return JSON.stringify(this.store);
2258 };
2259 return TransferState;
2260 }());
2261 TransferState.decorators = [
2262 { type: i0.Injectable }
2263 ];
2264 function initTransferState(doc, appId) {
2265 // Locate the script tag with the JSON data transferred from the server.
2266 // The id of the script tag is set to the Angular appId + 'state'.
2267 var script = doc.getElementById(appId + '-state');
2268 var initialState = {};
2269 if (script && script.textContent) {
2270 try {
2271 initialState = JSON.parse(unescapeHtml(script.textContent));
2272 }
2273 catch (e) {
2274 console.warn('Exception while restoring TransferState for app ' + appId, e);
2275 }
2276 }
2277 return TransferState.init(initialState);
2278 }
2279 /**
2280 * NgModule to install on the client side while using the `TransferState` to transfer state from
2281 * server to client.
2282 *
2283 * @publicApi
2284 */
2285 var BrowserTransferStateModule = /** @class */ (function () {
2286 function BrowserTransferStateModule() {
2287 }
2288 return BrowserTransferStateModule;
2289 }());
2290 BrowserTransferStateModule.decorators = [
2291 { type: i0.NgModule, args: [{
2292 providers: [{ provide: TransferState, useFactory: initTransferState, deps: [common.DOCUMENT, i0.APP_ID] }],
2293 },] }
2294 ];
2295
2296 /**
2297 * @license
2298 * Copyright Google LLC All Rights Reserved.
2299 *
2300 * Use of this source code is governed by an MIT-style license that can be
2301 * found in the LICENSE file at https://angular.io/license
2302 */
2303 /**
2304 * Predicates for use with {@link DebugElement}'s query functions.
2305 *
2306 * @publicApi
2307 */
2308 var By = /** @class */ (function () {
2309 function By() {
2310 }
2311 /**
2312 * Match all nodes.
2313 *
2314 * @usageNotes
2315 * ### Example
2316 *
2317 * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
2318 */
2319 By.all = function () {
2320 return function () { return true; };
2321 };
2322 /**
2323 * Match elements by the given CSS selector.
2324 *
2325 * @usageNotes
2326 * ### Example
2327 *
2328 * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
2329 */
2330 By.css = function (selector) {
2331 return function (debugElement) {
2332 return debugElement.nativeElement != null ?
2333 elementMatches(debugElement.nativeElement, selector) :
2334 false;
2335 };
2336 };
2337 /**
2338 * Match nodes that have the given directive present.
2339 *
2340 * @usageNotes
2341 * ### Example
2342 *
2343 * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
2344 */
2345 By.directive = function (type) {
2346 return function (debugNode) { return debugNode.providerTokens.indexOf(type) !== -1; };
2347 };
2348 return By;
2349 }());
2350 function elementMatches(n, selector) {
2351 if (common.ɵgetDOM().isElementNode(n)) {
2352 return n.matches && n.matches(selector) ||
2353 n.msMatchesSelector && n.msMatchesSelector(selector) ||
2354 n.webkitMatchesSelector && n.webkitMatchesSelector(selector);
2355 }
2356 return false;
2357 }
2358
2359 /**
2360 * @license
2361 * Copyright Google LLC All Rights Reserved.
2362 *
2363 * Use of this source code is governed by an MIT-style license that can be
2364 * found in the LICENSE file at https://angular.io/license
2365 */
2366
2367 /**
2368 * @license
2369 * Copyright Google LLC All Rights Reserved.
2370 *
2371 * Use of this source code is governed by an MIT-style license that can be
2372 * found in the LICENSE file at https://angular.io/license
2373 */
2374 /**
2375 * @publicApi
2376 */
2377 var VERSION = new i0.Version('10.0.9');
2378
2379 /**
2380 * @license
2381 * Copyright Google LLC All Rights Reserved.
2382 *
2383 * Use of this source code is governed by an MIT-style license that can be
2384 * found in the LICENSE file at https://angular.io/license
2385 */
2386
2387 /**
2388 * @license
2389 * Copyright Google LLC All Rights Reserved.
2390 *
2391 * Use of this source code is governed by an MIT-style license that can be
2392 * found in the LICENSE file at https://angular.io/license
2393 */
2394 // This file only reexports content of the `src` folder. Keep it that way.
2395
2396 /**
2397 * @license
2398 * Copyright Google LLC All Rights Reserved.
2399 *
2400 * Use of this source code is governed by an MIT-style license that can be
2401 * found in the LICENSE file at https://angular.io/license
2402 */
2403
2404 /**
2405 * Generated bundle index. Do not edit.
2406 */
2407
2408 Object.defineProperty(exports, 'ɵgetDOM', {
2409 enumerable: true,
2410 get: function () {
2411 return common.ɵgetDOM;
2412 }
2413 });
2414 exports.BrowserModule = BrowserModule;
2415 exports.BrowserTransferStateModule = BrowserTransferStateModule;
2416 exports.By = By;
2417 exports.DomSanitizer = DomSanitizer;
2418 exports.EVENT_MANAGER_PLUGINS = EVENT_MANAGER_PLUGINS;
2419 exports.EventManager = EventManager;
2420 exports.HAMMER_GESTURE_CONFIG = HAMMER_GESTURE_CONFIG;
2421 exports.HAMMER_LOADER = HAMMER_LOADER;
2422 exports.HammerGestureConfig = HammerGestureConfig;
2423 exports.HammerModule = HammerModule;
2424 exports.Meta = Meta;
2425 exports.Title = Title;
2426 exports.TransferState = TransferState;
2427 exports.VERSION = VERSION;
2428 exports.disableDebugTools = disableDebugTools;
2429 exports.enableDebugTools = enableDebugTools;
2430 exports.makeStateKey = makeStateKey;
2431 exports.platformBrowser = platformBrowser;
2432 exports.ɵBROWSER_SANITIZATION_PROVIDERS = BROWSER_SANITIZATION_PROVIDERS;
2433 exports.ɵBROWSER_SANITIZATION_PROVIDERS__POST_R3__ = BROWSER_SANITIZATION_PROVIDERS__POST_R3__;
2434 exports.ɵBrowserDomAdapter = BrowserDomAdapter;
2435 exports.ɵBrowserGetTestability = BrowserGetTestability;
2436 exports.ɵDomEventsPlugin = DomEventsPlugin;
2437 exports.ɵDomRendererFactory2 = DomRendererFactory2;
2438 exports.ɵDomSanitizerImpl = DomSanitizerImpl;
2439 exports.ɵDomSharedStylesHost = DomSharedStylesHost;
2440 exports.ɵELEMENT_PROBE_PROVIDERS = ELEMENT_PROBE_PROVIDERS;
2441 exports.ɵELEMENT_PROBE_PROVIDERS__POST_R3__ = ELEMENT_PROBE_PROVIDERS__POST_R3__;
2442 exports.ɵHAMMER_PROVIDERS__POST_R3__ = HAMMER_PROVIDERS__POST_R3__;
2443 exports.ɵHammerGesturesPlugin = HammerGesturesPlugin;
2444 exports.ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS = INTERNAL_BROWSER_PLATFORM_PROVIDERS;
2445 exports.ɵKeyEventsPlugin = KeyEventsPlugin;
2446 exports.ɵNAMESPACE_URIS = NAMESPACE_URIS;
2447 exports.ɵSharedStylesHost = SharedStylesHost;
2448 exports.ɵTRANSITION_ID = TRANSITION_ID;
2449 exports.ɵangular_packages_platform_browser_platform_browser_a = errorHandler;
2450 exports.ɵangular_packages_platform_browser_platform_browser_b = _document;
2451 exports.ɵangular_packages_platform_browser_platform_browser_c = BROWSER_MODULE_PROVIDERS;
2452 exports.ɵangular_packages_platform_browser_platform_browser_d = createMeta;
2453 exports.ɵangular_packages_platform_browser_platform_browser_e = createTitle;
2454 exports.ɵangular_packages_platform_browser_platform_browser_f = initTransferState;
2455 exports.ɵangular_packages_platform_browser_platform_browser_g = EventManagerPlugin;
2456 exports.ɵangular_packages_platform_browser_platform_browser_h = HAMMER_PROVIDERS__PRE_R3__;
2457 exports.ɵangular_packages_platform_browser_platform_browser_i = HAMMER_PROVIDERS;
2458 exports.ɵangular_packages_platform_browser_platform_browser_j = domSanitizerImplFactory;
2459 exports.ɵangular_packages_platform_browser_platform_browser_k = appInitializerFactory;
2460 exports.ɵangular_packages_platform_browser_platform_browser_l = SERVER_TRANSITION_PROVIDERS;
2461 exports.ɵangular_packages_platform_browser_platform_browser_m = _createNgProbeR2;
2462 exports.ɵangular_packages_platform_browser_platform_browser_n = ELEMENT_PROBE_PROVIDERS__PRE_R3__;
2463 exports.ɵangular_packages_platform_browser_platform_browser_o = GenericBrowserDomAdapter;
2464 exports.ɵescapeHtml = escapeHtml;
2465 exports.ɵflattenStyles = flattenStyles;
2466 exports.ɵinitDomAdapter = initDomAdapter;
2467 exports.ɵshimContentAttribute = shimContentAttribute;
2468 exports.ɵshimHostAttribute = shimHostAttribute;
2469
2470 Object.defineProperty(exports, '__esModule', { value: true });
2471
2472})));
2473//# sourceMappingURL=platform-browser.umd.js.map