UNPKG

105 kBJavaScriptView Raw
1/**
2 * @license Angular v10.0.6
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 return { domEventName: domEventName, fullKey: fullKey };
1509 };
1510 KeyEventsPlugin.getEventFullKey = function (event) {
1511 var fullKey = '';
1512 var key = getEventKey(event);
1513 key = key.toLowerCase();
1514 if (key === ' ') {
1515 key = 'space'; // for readability
1516 }
1517 else if (key === '.') {
1518 key = 'dot'; // because '.' is used as a separator in event names
1519 }
1520 MODIFIER_KEYS.forEach(function (modifierName) {
1521 if (modifierName != key) {
1522 var modifierGetter = MODIFIER_KEY_GETTERS[modifierName];
1523 if (modifierGetter(event)) {
1524 fullKey += modifierName + '.';
1525 }
1526 }
1527 });
1528 fullKey += key;
1529 return fullKey;
1530 };
1531 /**
1532 * Configures a handler callback for a key event.
1533 * @param fullKey The event name that combines all simultaneous keystrokes.
1534 * @param handler The function that responds to the key event.
1535 * @param zone The zone in which the event occurred.
1536 * @returns A callback function.
1537 */
1538 KeyEventsPlugin.eventCallback = function (fullKey, handler, zone) {
1539 return function (event /** TODO #9100 */) {
1540 if (KeyEventsPlugin.getEventFullKey(event) === fullKey) {
1541 zone.runGuarded(function () { return handler(event); });
1542 }
1543 };
1544 };
1545 /** @internal */
1546 KeyEventsPlugin._normalizeKey = function (keyName) {
1547 // TODO: switch to a Map if the mapping grows too much
1548 switch (keyName) {
1549 case 'esc':
1550 return 'escape';
1551 default:
1552 return keyName;
1553 }
1554 };
1555 return KeyEventsPlugin;
1556 }(EventManagerPlugin));
1557 KeyEventsPlugin.decorators = [
1558 { type: i0.Injectable }
1559 ];
1560 KeyEventsPlugin.ctorParameters = function () { return [
1561 { type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
1562 ]; };
1563 function getEventKey(event) {
1564 var key = event.key;
1565 if (key == null) {
1566 key = event.keyIdentifier;
1567 // keyIdentifier is defined in the old draft of DOM Level 3 Events implemented by Chrome and
1568 // Safari cf
1569 // http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/events.html#Events-KeyboardEvents-Interfaces
1570 if (key == null) {
1571 return 'Unidentified';
1572 }
1573 if (key.startsWith('U+')) {
1574 key = String.fromCharCode(parseInt(key.substring(2), 16));
1575 if (event.location === DOM_KEY_LOCATION_NUMPAD && _chromeNumKeyPadMap.hasOwnProperty(key)) {
1576 // There is a bug in Chrome for numeric keypad keys:
1577 // https://code.google.com/p/chromium/issues/detail?id=155654
1578 // 1, 2, 3 ... are reported as A, B, C ...
1579 key = _chromeNumKeyPadMap[key];
1580 }
1581 }
1582 }
1583 return _keyMap[key] || key;
1584 }
1585
1586 /**
1587 * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing
1588 * values to be safe to use in the different DOM contexts.
1589 *
1590 * For example, when binding a URL in an `<a [href]="someValue">` hyperlink, `someValue` will be
1591 * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on
1592 * the website.
1593 *
1594 * In specific situations, it might be necessary to disable sanitization, for example if the
1595 * application genuinely needs to produce a `javascript:` style link with a dynamic value in it.
1596 * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...`
1597 * methods, and then binding to that value from the template.
1598 *
1599 * These situations should be very rare, and extraordinary care must be taken to avoid creating a
1600 * Cross Site Scripting (XSS) security bug!
1601 *
1602 * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as
1603 * close as possible to the source of the value, to make it easy to verify no security bug is
1604 * created by its use.
1605 *
1606 * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that
1607 * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous
1608 * code. The sanitizer leaves safe values intact.
1609 *
1610 * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in
1611 * sanitization for the value passed in. Carefully check and audit all values and code paths going
1612 * into this call. Make sure any user data is appropriately escaped for this security context.
1613 * For more detail, see the [Security Guide](http://g.co/ng/security).
1614 *
1615 * @publicApi
1616 */
1617 var DomSanitizer = /** @class */ (function () {
1618 function DomSanitizer() {
1619 }
1620 return DomSanitizer;
1621 }());
1622 DomSanitizer.ɵprov = i0.ɵɵdefineInjectable({ factory: function DomSanitizer_Factory() { return i0.ɵɵinject(DomSanitizerImpl); }, token: DomSanitizer, providedIn: "root" });
1623 DomSanitizer.decorators = [
1624 { type: i0.Injectable, args: [{ providedIn: 'root', useExisting: i0.forwardRef(function () { return DomSanitizerImpl; }) },] }
1625 ];
1626 function domSanitizerImplFactory(injector) {
1627 return new DomSanitizerImpl(injector.get(common.DOCUMENT));
1628 }
1629 var DomSanitizerImpl = /** @class */ (function (_super) {
1630 __extends(DomSanitizerImpl, _super);
1631 function DomSanitizerImpl(_doc) {
1632 var _this = _super.call(this) || this;
1633 _this._doc = _doc;
1634 return _this;
1635 }
1636 DomSanitizerImpl.prototype.sanitize = function (ctx, value) {
1637 if (value == null)
1638 return null;
1639 switch (ctx) {
1640 case i0.SecurityContext.NONE:
1641 return value;
1642 case i0.SecurityContext.HTML:
1643 if (i0.ɵallowSanitizationBypassAndThrow(value, "HTML" /* Html */)) {
1644 return i0.ɵunwrapSafeValue(value);
1645 }
1646 return i0.ɵ_sanitizeHtml(this._doc, String(value));
1647 case i0.SecurityContext.STYLE:
1648 if (i0.ɵallowSanitizationBypassAndThrow(value, "Style" /* Style */)) {
1649 return i0.ɵunwrapSafeValue(value);
1650 }
1651 return value;
1652 case i0.SecurityContext.SCRIPT:
1653 if (i0.ɵallowSanitizationBypassAndThrow(value, "Script" /* Script */)) {
1654 return i0.ɵunwrapSafeValue(value);
1655 }
1656 throw new Error('unsafe value used in a script context');
1657 case i0.SecurityContext.URL:
1658 var type = i0.ɵgetSanitizationBypassType(value);
1659 if (i0.ɵallowSanitizationBypassAndThrow(value, "URL" /* Url */)) {
1660 return i0.ɵunwrapSafeValue(value);
1661 }
1662 return i0.ɵ_sanitizeUrl(String(value));
1663 case i0.SecurityContext.RESOURCE_URL:
1664 if (i0.ɵallowSanitizationBypassAndThrow(value, "ResourceURL" /* ResourceUrl */)) {
1665 return i0.ɵunwrapSafeValue(value);
1666 }
1667 throw new Error('unsafe value used in a resource URL context (see http://g.co/ng/security#xss)');
1668 default:
1669 throw new Error("Unexpected SecurityContext " + ctx + " (see http://g.co/ng/security#xss)");
1670 }
1671 };
1672 DomSanitizerImpl.prototype.bypassSecurityTrustHtml = function (value) {
1673 return i0.ɵbypassSanitizationTrustHtml(value);
1674 };
1675 DomSanitizerImpl.prototype.bypassSecurityTrustStyle = function (value) {
1676 return i0.ɵbypassSanitizationTrustStyle(value);
1677 };
1678 DomSanitizerImpl.prototype.bypassSecurityTrustScript = function (value) {
1679 return i0.ɵbypassSanitizationTrustScript(value);
1680 };
1681 DomSanitizerImpl.prototype.bypassSecurityTrustUrl = function (value) {
1682 return i0.ɵbypassSanitizationTrustUrl(value);
1683 };
1684 DomSanitizerImpl.prototype.bypassSecurityTrustResourceUrl = function (value) {
1685 return i0.ɵbypassSanitizationTrustResourceUrl(value);
1686 };
1687 return DomSanitizerImpl;
1688 }(DomSanitizer));
1689 DomSanitizerImpl.ɵprov = i0.ɵɵdefineInjectable({ factory: function DomSanitizerImpl_Factory() { return domSanitizerImplFactory(i0.ɵɵinject(i0.INJECTOR)); }, token: DomSanitizerImpl, providedIn: "root" });
1690 DomSanitizerImpl.decorators = [
1691 { type: i0.Injectable, args: [{ providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [i0.Injector] },] }
1692 ];
1693 DomSanitizerImpl.ctorParameters = function () { return [
1694 { type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
1695 ]; };
1696
1697 /**
1698 * @license
1699 * Copyright Google LLC All Rights Reserved.
1700 *
1701 * Use of this source code is governed by an MIT-style license that can be
1702 * found in the LICENSE file at https://angular.io/license
1703 */
1704 function initDomAdapter() {
1705 BrowserDomAdapter.makeCurrent();
1706 BrowserGetTestability.init();
1707 }
1708 function errorHandler() {
1709 return new i0.ErrorHandler();
1710 }
1711 function _document() {
1712 // Tell ivy about the global document
1713 i0.ɵsetDocument(document);
1714 return document;
1715 }
1716 var ɵ0$4 = common.ɵPLATFORM_BROWSER_ID;
1717 var INTERNAL_BROWSER_PLATFORM_PROVIDERS = [
1718 { provide: i0.PLATFORM_ID, useValue: ɵ0$4 },
1719 { provide: i0.PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true },
1720 { provide: common.DOCUMENT, useFactory: _document, deps: [] },
1721 ];
1722 var BROWSER_SANITIZATION_PROVIDERS__PRE_R3__ = [
1723 { provide: i0.Sanitizer, useExisting: DomSanitizer },
1724 { provide: DomSanitizer, useClass: DomSanitizerImpl, deps: [common.DOCUMENT] },
1725 ];
1726 var BROWSER_SANITIZATION_PROVIDERS__POST_R3__ = [];
1727 /**
1728 * @security Replacing built-in sanitization providers exposes the application to XSS risks.
1729 * Attacker-controlled data introduced by an unsanitized provider could expose your
1730 * application to XSS risks. For more detail, see the [Security Guide](http://g.co/ng/security).
1731 * @publicApi
1732 */
1733 var BROWSER_SANITIZATION_PROVIDERS = BROWSER_SANITIZATION_PROVIDERS__PRE_R3__;
1734 /**
1735 * A factory function that returns a `PlatformRef` instance associated with browser service
1736 * providers.
1737 *
1738 * @publicApi
1739 */
1740 var platformBrowser = i0.createPlatformFactory(i0.platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);
1741 var BROWSER_MODULE_PROVIDERS = [
1742 BROWSER_SANITIZATION_PROVIDERS,
1743 { provide: i0.ɵINJECTOR_SCOPE, useValue: 'root' },
1744 { provide: i0.ErrorHandler, useFactory: errorHandler, deps: [] },
1745 {
1746 provide: EVENT_MANAGER_PLUGINS,
1747 useClass: DomEventsPlugin,
1748 multi: true,
1749 deps: [common.DOCUMENT, i0.NgZone, i0.PLATFORM_ID]
1750 },
1751 { provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true, deps: [common.DOCUMENT] },
1752 HAMMER_PROVIDERS,
1753 {
1754 provide: DomRendererFactory2,
1755 useClass: DomRendererFactory2,
1756 deps: [EventManager, DomSharedStylesHost, i0.APP_ID]
1757 },
1758 { provide: i0.RendererFactory2, useExisting: DomRendererFactory2 },
1759 { provide: SharedStylesHost, useExisting: DomSharedStylesHost },
1760 { provide: DomSharedStylesHost, useClass: DomSharedStylesHost, deps: [common.DOCUMENT] },
1761 { provide: i0.Testability, useClass: i0.Testability, deps: [i0.NgZone] },
1762 { provide: EventManager, useClass: EventManager, deps: [EVENT_MANAGER_PLUGINS, i0.NgZone] },
1763 ELEMENT_PROBE_PROVIDERS,
1764 ];
1765 /**
1766 * Exports required infrastructure for all Angular apps.
1767 * Included by default in all Angular apps created with the CLI
1768 * `new` command.
1769 * Re-exports `CommonModule` and `ApplicationModule`, making their
1770 * exports and providers available to all apps.
1771 *
1772 * @publicApi
1773 */
1774 var BrowserModule = /** @class */ (function () {
1775 function BrowserModule(parentModule) {
1776 if (parentModule) {
1777 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.");
1778 }
1779 }
1780 /**
1781 * Configures a browser-based app to transition from a server-rendered app, if
1782 * one is present on the page.
1783 *
1784 * @param params An object containing an identifier for the app to transition.
1785 * The ID must match between the client and server versions of the app.
1786 * @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.
1787 */
1788 BrowserModule.withServerTransition = function (params) {
1789 return {
1790 ngModule: BrowserModule,
1791 providers: [
1792 { provide: i0.APP_ID, useValue: params.appId },
1793 { provide: TRANSITION_ID, useExisting: i0.APP_ID },
1794 SERVER_TRANSITION_PROVIDERS,
1795 ],
1796 };
1797 };
1798 return BrowserModule;
1799 }());
1800 BrowserModule.decorators = [
1801 { type: i0.NgModule, args: [{ providers: BROWSER_MODULE_PROVIDERS, exports: [common.CommonModule, i0.ApplicationModule] },] }
1802 ];
1803 BrowserModule.ctorParameters = function () { return [
1804 { type: BrowserModule, decorators: [{ type: i0.Optional }, { type: i0.SkipSelf }, { type: i0.Inject, args: [BrowserModule,] }] }
1805 ]; };
1806
1807 /**
1808 * @license
1809 * Copyright Google LLC All Rights Reserved.
1810 *
1811 * Use of this source code is governed by an MIT-style license that can be
1812 * found in the LICENSE file at https://angular.io/license
1813 */
1814 /**
1815 * Factory to create a `Meta` service instance for the current DOM document.
1816 */
1817 function createMeta() {
1818 return new Meta(i0.ɵɵinject(common.DOCUMENT));
1819 }
1820 /**
1821 * A service for managing HTML `<meta>` tags.
1822 *
1823 * Properties of the `MetaDefinition` object match the attributes of the
1824 * HTML `<meta>` tag. These tags define document metadata that is important for
1825 * things like configuring a Content Security Policy, defining browser compatibility
1826 * and security settings, setting HTTP Headers, defining rich content for social sharing,
1827 * and Search Engine Optimization (SEO).
1828 *
1829 * To identify specific `<meta>` tags in a document, use an attribute selection
1830 * string in the format `"tag_attribute='value string'"`.
1831 * For example, an `attrSelector` value of `"name='description'"` matches a tag
1832 * whose `name` attribute has the value `"description"`.
1833 * Selectors are used with the `querySelector()` Document method,
1834 * in the format `meta[{attrSelector}]`.
1835 *
1836 * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)
1837 * @see [Document.querySelector()](https://developer.mozilla.org/docs/Web/API/Document/querySelector)
1838 *
1839 *
1840 * @publicApi
1841 */
1842 var Meta = /** @class */ (function () {
1843 function Meta(_doc) {
1844 this._doc = _doc;
1845 this._dom = common.ɵgetDOM();
1846 }
1847 /**
1848 * Retrieves or creates a specific `<meta>` tag element in the current HTML document.
1849 * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute
1850 * values in the provided tag definition, and verifies that all other attribute values are equal.
1851 * If an existing element is found, it is returned and is not modified in any way.
1852 * @param tag The definition of a `<meta>` element to match or create.
1853 * @param forceCreation True to create a new element without checking whether one already exists.
1854 * @returns The existing element with the same attributes and values if found,
1855 * the new element if no match is found, or `null` if the tag parameter is not defined.
1856 */
1857 Meta.prototype.addTag = function (tag, forceCreation) {
1858 if (forceCreation === void 0) { forceCreation = false; }
1859 if (!tag)
1860 return null;
1861 return this._getOrCreateElement(tag, forceCreation);
1862 };
1863 /**
1864 * Retrieves or creates a set of `<meta>` tag elements in the current HTML document.
1865 * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute
1866 * values in the provided tag definition, and verifies that all other attribute values are equal.
1867 * @param tags An array of tag definitions to match or create.
1868 * @param forceCreation True to create new elements without checking whether they already exist.
1869 * @returns The matching elements if found, or the new elements.
1870 */
1871 Meta.prototype.addTags = function (tags, forceCreation) {
1872 var _this = this;
1873 if (forceCreation === void 0) { forceCreation = false; }
1874 if (!tags)
1875 return [];
1876 return tags.reduce(function (result, tag) {
1877 if (tag) {
1878 result.push(_this._getOrCreateElement(tag, forceCreation));
1879 }
1880 return result;
1881 }, []);
1882 };
1883 /**
1884 * Retrieves a `<meta>` tag element in the current HTML document.
1885 * @param attrSelector The tag attribute and value to match against, in the format
1886 * `"tag_attribute='value string'"`.
1887 * @returns The matching element, if any.
1888 */
1889 Meta.prototype.getTag = function (attrSelector) {
1890 if (!attrSelector)
1891 return null;
1892 return this._doc.querySelector("meta[" + attrSelector + "]") || null;
1893 };
1894 /**
1895 * Retrieves a set of `<meta>` tag elements in the current HTML document.
1896 * @param attrSelector The tag attribute and value to match against, in the format
1897 * `"tag_attribute='value string'"`.
1898 * @returns The matching elements, if any.
1899 */
1900 Meta.prototype.getTags = function (attrSelector) {
1901 if (!attrSelector)
1902 return [];
1903 var list /*NodeList*/ = this._doc.querySelectorAll("meta[" + attrSelector + "]");
1904 return list ? [].slice.call(list) : [];
1905 };
1906 /**
1907 * Modifies an existing `<meta>` tag element in the current HTML document.
1908 * @param tag The tag description with which to replace the existing tag content.
1909 * @param selector A tag attribute and value to match against, to identify
1910 * an existing tag. A string in the format `"tag_attribute=`value string`"`.
1911 * If not supplied, matches a tag with the same `name` or `property` attribute value as the
1912 * replacement tag.
1913 * @return The modified element.
1914 */
1915 Meta.prototype.updateTag = function (tag, selector) {
1916 if (!tag)
1917 return null;
1918 selector = selector || this._parseSelector(tag);
1919 var meta = this.getTag(selector);
1920 if (meta) {
1921 return this._setMetaElementAttributes(tag, meta);
1922 }
1923 return this._getOrCreateElement(tag, true);
1924 };
1925 /**
1926 * Removes an existing `<meta>` tag element from the current HTML document.
1927 * @param attrSelector A tag attribute and value to match against, to identify
1928 * an existing tag. A string in the format `"tag_attribute=`value string`"`.
1929 */
1930 Meta.prototype.removeTag = function (attrSelector) {
1931 this.removeTagElement(this.getTag(attrSelector));
1932 };
1933 /**
1934 * Removes an existing `<meta>` tag element from the current HTML document.
1935 * @param meta The tag definition to match against to identify an existing tag.
1936 */
1937 Meta.prototype.removeTagElement = function (meta) {
1938 if (meta) {
1939 this._dom.remove(meta);
1940 }
1941 };
1942 Meta.prototype._getOrCreateElement = function (meta, forceCreation) {
1943 if (forceCreation === void 0) { forceCreation = false; }
1944 if (!forceCreation) {
1945 var selector = this._parseSelector(meta);
1946 var elem = this.getTag(selector);
1947 // It's allowed to have multiple elements with the same name so it's not enough to
1948 // just check that element with the same name already present on the page. We also need to
1949 // check if element has tag attributes
1950 if (elem && this._containsAttributes(meta, elem))
1951 return elem;
1952 }
1953 var element = this._dom.createElement('meta');
1954 this._setMetaElementAttributes(meta, element);
1955 var head = this._doc.getElementsByTagName('head')[0];
1956 head.appendChild(element);
1957 return element;
1958 };
1959 Meta.prototype._setMetaElementAttributes = function (tag, el) {
1960 Object.keys(tag).forEach(function (prop) { return el.setAttribute(prop, tag[prop]); });
1961 return el;
1962 };
1963 Meta.prototype._parseSelector = function (tag) {
1964 var attr = tag.name ? 'name' : 'property';
1965 return attr + "=\"" + tag[attr] + "\"";
1966 };
1967 Meta.prototype._containsAttributes = function (tag, elem) {
1968 return Object.keys(tag).every(function (key) { return elem.getAttribute(key) === tag[key]; });
1969 };
1970 return Meta;
1971 }());
1972 Meta.ɵprov = i0.ɵɵdefineInjectable({ factory: createMeta, token: Meta, providedIn: "root" });
1973 Meta.decorators = [
1974 { type: i0.Injectable, args: [{ providedIn: 'root', useFactory: createMeta, deps: [] },] }
1975 ];
1976 Meta.ctorParameters = function () { return [
1977 { type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
1978 ]; };
1979
1980 /**
1981 * @license
1982 * Copyright Google LLC All Rights Reserved.
1983 *
1984 * Use of this source code is governed by an MIT-style license that can be
1985 * found in the LICENSE file at https://angular.io/license
1986 */
1987 /**
1988 * Factory to create Title service.
1989 */
1990 function createTitle() {
1991 return new Title(i0.ɵɵinject(common.DOCUMENT));
1992 }
1993 /**
1994 * A service that can be used to get and set the title of a current HTML document.
1995 *
1996 * Since an Angular application can't be bootstrapped on the entire HTML document (`<html>` tag)
1997 * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements
1998 * (representing the `<title>` tag). Instead, this service can be used to set and get the current
1999 * title value.
2000 *
2001 * @publicApi
2002 */
2003 var Title = /** @class */ (function () {
2004 function Title(_doc) {
2005 this._doc = _doc;
2006 }
2007 /**
2008 * Get the title of the current HTML document.
2009 */
2010 Title.prototype.getTitle = function () {
2011 return this._doc.title;
2012 };
2013 /**
2014 * Set the title of the current HTML document.
2015 * @param newTitle
2016 */
2017 Title.prototype.setTitle = function (newTitle) {
2018 this._doc.title = newTitle || '';
2019 };
2020 return Title;
2021 }());
2022 Title.ɵprov = i0.ɵɵdefineInjectable({ factory: createTitle, token: Title, providedIn: "root" });
2023 Title.decorators = [
2024 { type: i0.Injectable, args: [{ providedIn: 'root', useFactory: createTitle, deps: [] },] }
2025 ];
2026 Title.ctorParameters = function () { return [
2027 { type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
2028 ]; };
2029
2030 /**
2031 * @license
2032 * Copyright Google LLC All Rights Reserved.
2033 *
2034 * Use of this source code is governed by an MIT-style license that can be
2035 * found in the LICENSE file at https://angular.io/license
2036 */
2037 var win = typeof window !== 'undefined' && window || {};
2038
2039 /**
2040 * @license
2041 * Copyright Google LLC All Rights Reserved.
2042 *
2043 * Use of this source code is governed by an MIT-style license that can be
2044 * found in the LICENSE file at https://angular.io/license
2045 */
2046 var ChangeDetectionPerfRecord = /** @class */ (function () {
2047 function ChangeDetectionPerfRecord(msPerTick, numTicks) {
2048 this.msPerTick = msPerTick;
2049 this.numTicks = numTicks;
2050 }
2051 return ChangeDetectionPerfRecord;
2052 }());
2053 /**
2054 * Entry point for all Angular profiling-related debug tools. This object
2055 * corresponds to the `ng.profiler` in the dev console.
2056 */
2057 var AngularProfiler = /** @class */ (function () {
2058 function AngularProfiler(ref) {
2059 this.appRef = ref.injector.get(i0.ApplicationRef);
2060 }
2061 // tslint:disable:no-console
2062 /**
2063 * Exercises change detection in a loop and then prints the average amount of
2064 * time in milliseconds how long a single round of change detection takes for
2065 * the current state of the UI. It runs a minimum of 5 rounds for a minimum
2066 * of 500 milliseconds.
2067 *
2068 * Optionally, a user may pass a `config` parameter containing a map of
2069 * options. Supported options are:
2070 *
2071 * `record` (boolean) - causes the profiler to record a CPU profile while
2072 * it exercises the change detector. Example:
2073 *
2074 * ```
2075 * ng.profiler.timeChangeDetection({record: true})
2076 * ```
2077 */
2078 AngularProfiler.prototype.timeChangeDetection = function (config) {
2079 var record = config && config['record'];
2080 var profileName = 'Change Detection';
2081 // Profiler is not available in Android browsers, nor in IE 9 without dev tools opened
2082 var isProfilerAvailable = win.console.profile != null;
2083 if (record && isProfilerAvailable) {
2084 win.console.profile(profileName);
2085 }
2086 var start = common.ɵgetDOM().performanceNow();
2087 var numTicks = 0;
2088 while (numTicks < 5 || (common.ɵgetDOM().performanceNow() - start) < 500) {
2089 this.appRef.tick();
2090 numTicks++;
2091 }
2092 var end = common.ɵgetDOM().performanceNow();
2093 if (record && isProfilerAvailable) {
2094 win.console.profileEnd(profileName);
2095 }
2096 var msPerTick = (end - start) / numTicks;
2097 win.console.log("ran " + numTicks + " change detection cycles");
2098 win.console.log(msPerTick.toFixed(2) + " ms per check");
2099 return new ChangeDetectionPerfRecord(msPerTick, numTicks);
2100 };
2101 return AngularProfiler;
2102 }());
2103
2104 /**
2105 * @license
2106 * Copyright Google LLC All Rights Reserved.
2107 *
2108 * Use of this source code is governed by an MIT-style license that can be
2109 * found in the LICENSE file at https://angular.io/license
2110 */
2111 var PROFILER_GLOBAL_NAME = 'profiler';
2112 /**
2113 * Enabled Angular debug tools that are accessible via your browser's
2114 * developer console.
2115 *
2116 * Usage:
2117 *
2118 * 1. Open developer console (e.g. in Chrome Ctrl + Shift + j)
2119 * 1. Type `ng.` (usually the console will show auto-complete suggestion)
2120 * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()`
2121 * then hit Enter.
2122 *
2123 * @publicApi
2124 */
2125 function enableDebugTools(ref) {
2126 exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));
2127 return ref;
2128 }
2129 /**
2130 * Disables Angular tools.
2131 *
2132 * @publicApi
2133 */
2134 function disableDebugTools() {
2135 exportNgVar(PROFILER_GLOBAL_NAME, null);
2136 }
2137
2138 /**
2139 * @license
2140 * Copyright Google LLC All Rights Reserved.
2141 *
2142 * Use of this source code is governed by an MIT-style license that can be
2143 * found in the LICENSE file at https://angular.io/license
2144 */
2145 function escapeHtml(text) {
2146 var escapedText = {
2147 '&': '&a;',
2148 '"': '&q;',
2149 '\'': '&s;',
2150 '<': '&l;',
2151 '>': '&g;',
2152 };
2153 return text.replace(/[&"'<>]/g, function (s) { return escapedText[s]; });
2154 }
2155 function unescapeHtml(text) {
2156 var unescapedText = {
2157 '&a;': '&',
2158 '&q;': '"',
2159 '&s;': '\'',
2160 '&l;': '<',
2161 '&g;': '>',
2162 };
2163 return text.replace(/&[^;]+;/g, function (s) { return unescapedText[s]; });
2164 }
2165 /**
2166 * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.
2167 *
2168 * Example:
2169 *
2170 * ```
2171 * const COUNTER_KEY = makeStateKey<number>('counter');
2172 * let value = 10;
2173 *
2174 * transferState.set(COUNTER_KEY, value);
2175 * ```
2176 *
2177 * @publicApi
2178 */
2179 function makeStateKey(key) {
2180 return key;
2181 }
2182 /**
2183 * A key value store that is transferred from the application on the server side to the application
2184 * on the client side.
2185 *
2186 * `TransferState` will be available as an injectable token. To use it import
2187 * `ServerTransferStateModule` on the server and `BrowserTransferStateModule` on the client.
2188 *
2189 * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only
2190 * boolean, number, string, null and non-class objects will be serialized and deserialzied in a
2191 * non-lossy manner.
2192 *
2193 * @publicApi
2194 */
2195 var TransferState = /** @class */ (function () {
2196 function TransferState() {
2197 this.store = {};
2198 this.onSerializeCallbacks = {};
2199 }
2200 /** @internal */
2201 TransferState.init = function (initState) {
2202 var transferState = new TransferState();
2203 transferState.store = initState;
2204 return transferState;
2205 };
2206 /**
2207 * Get the value corresponding to a key. Return `defaultValue` if key is not found.
2208 */
2209 TransferState.prototype.get = function (key, defaultValue) {
2210 return this.store[key] !== undefined ? this.store[key] : defaultValue;
2211 };
2212 /**
2213 * Set the value corresponding to a key.
2214 */
2215 TransferState.prototype.set = function (key, value) {
2216 this.store[key] = value;
2217 };
2218 /**
2219 * Remove a key from the store.
2220 */
2221 TransferState.prototype.remove = function (key) {
2222 delete this.store[key];
2223 };
2224 /**
2225 * Test whether a key exists in the store.
2226 */
2227 TransferState.prototype.hasKey = function (key) {
2228 return this.store.hasOwnProperty(key);
2229 };
2230 /**
2231 * Register a callback to provide the value for a key when `toJson` is called.
2232 */
2233 TransferState.prototype.onSerialize = function (key, callback) {
2234 this.onSerializeCallbacks[key] = callback;
2235 };
2236 /**
2237 * Serialize the current state of the store to JSON.
2238 */
2239 TransferState.prototype.toJson = function () {
2240 // Call the onSerialize callbacks and put those values into the store.
2241 for (var key in this.onSerializeCallbacks) {
2242 if (this.onSerializeCallbacks.hasOwnProperty(key)) {
2243 try {
2244 this.store[key] = this.onSerializeCallbacks[key]();
2245 }
2246 catch (e) {
2247 console.warn('Exception in onSerialize callback: ', e);
2248 }
2249 }
2250 }
2251 return JSON.stringify(this.store);
2252 };
2253 return TransferState;
2254 }());
2255 TransferState.decorators = [
2256 { type: i0.Injectable }
2257 ];
2258 function initTransferState(doc, appId) {
2259 // Locate the script tag with the JSON data transferred from the server.
2260 // The id of the script tag is set to the Angular appId + 'state'.
2261 var script = doc.getElementById(appId + '-state');
2262 var initialState = {};
2263 if (script && script.textContent) {
2264 try {
2265 initialState = JSON.parse(unescapeHtml(script.textContent));
2266 }
2267 catch (e) {
2268 console.warn('Exception while restoring TransferState for app ' + appId, e);
2269 }
2270 }
2271 return TransferState.init(initialState);
2272 }
2273 /**
2274 * NgModule to install on the client side while using the `TransferState` to transfer state from
2275 * server to client.
2276 *
2277 * @publicApi
2278 */
2279 var BrowserTransferStateModule = /** @class */ (function () {
2280 function BrowserTransferStateModule() {
2281 }
2282 return BrowserTransferStateModule;
2283 }());
2284 BrowserTransferStateModule.decorators = [
2285 { type: i0.NgModule, args: [{
2286 providers: [{ provide: TransferState, useFactory: initTransferState, deps: [common.DOCUMENT, i0.APP_ID] }],
2287 },] }
2288 ];
2289
2290 /**
2291 * @license
2292 * Copyright Google LLC All Rights Reserved.
2293 *
2294 * Use of this source code is governed by an MIT-style license that can be
2295 * found in the LICENSE file at https://angular.io/license
2296 */
2297 /**
2298 * Predicates for use with {@link DebugElement}'s query functions.
2299 *
2300 * @publicApi
2301 */
2302 var By = /** @class */ (function () {
2303 function By() {
2304 }
2305 /**
2306 * Match all nodes.
2307 *
2308 * @usageNotes
2309 * ### Example
2310 *
2311 * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
2312 */
2313 By.all = function () {
2314 return function () { return true; };
2315 };
2316 /**
2317 * Match elements by the given CSS selector.
2318 *
2319 * @usageNotes
2320 * ### Example
2321 *
2322 * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
2323 */
2324 By.css = function (selector) {
2325 return function (debugElement) {
2326 return debugElement.nativeElement != null ?
2327 elementMatches(debugElement.nativeElement, selector) :
2328 false;
2329 };
2330 };
2331 /**
2332 * Match nodes that have the given directive present.
2333 *
2334 * @usageNotes
2335 * ### Example
2336 *
2337 * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
2338 */
2339 By.directive = function (type) {
2340 return function (debugNode) { return debugNode.providerTokens.indexOf(type) !== -1; };
2341 };
2342 return By;
2343 }());
2344 function elementMatches(n, selector) {
2345 if (common.ɵgetDOM().isElementNode(n)) {
2346 return n.matches && n.matches(selector) ||
2347 n.msMatchesSelector && n.msMatchesSelector(selector) ||
2348 n.webkitMatchesSelector && n.webkitMatchesSelector(selector);
2349 }
2350 return false;
2351 }
2352
2353 /**
2354 * @license
2355 * Copyright Google LLC All Rights Reserved.
2356 *
2357 * Use of this source code is governed by an MIT-style license that can be
2358 * found in the LICENSE file at https://angular.io/license
2359 */
2360
2361 /**
2362 * @license
2363 * Copyright Google LLC All Rights Reserved.
2364 *
2365 * Use of this source code is governed by an MIT-style license that can be
2366 * found in the LICENSE file at https://angular.io/license
2367 */
2368 /**
2369 * @publicApi
2370 */
2371 var VERSION = new i0.Version('10.0.6');
2372
2373 /**
2374 * @license
2375 * Copyright Google LLC All Rights Reserved.
2376 *
2377 * Use of this source code is governed by an MIT-style license that can be
2378 * found in the LICENSE file at https://angular.io/license
2379 */
2380
2381 /**
2382 * @license
2383 * Copyright Google LLC All Rights Reserved.
2384 *
2385 * Use of this source code is governed by an MIT-style license that can be
2386 * found in the LICENSE file at https://angular.io/license
2387 */
2388 // This file only reexports content of the `src` folder. Keep it that way.
2389
2390 /**
2391 * @license
2392 * Copyright Google LLC All Rights Reserved.
2393 *
2394 * Use of this source code is governed by an MIT-style license that can be
2395 * found in the LICENSE file at https://angular.io/license
2396 */
2397
2398 /**
2399 * Generated bundle index. Do not edit.
2400 */
2401
2402 Object.defineProperty(exports, 'ɵgetDOM', {
2403 enumerable: true,
2404 get: function () {
2405 return common.ɵgetDOM;
2406 }
2407 });
2408 exports.BrowserModule = BrowserModule;
2409 exports.BrowserTransferStateModule = BrowserTransferStateModule;
2410 exports.By = By;
2411 exports.DomSanitizer = DomSanitizer;
2412 exports.EVENT_MANAGER_PLUGINS = EVENT_MANAGER_PLUGINS;
2413 exports.EventManager = EventManager;
2414 exports.HAMMER_GESTURE_CONFIG = HAMMER_GESTURE_CONFIG;
2415 exports.HAMMER_LOADER = HAMMER_LOADER;
2416 exports.HammerGestureConfig = HammerGestureConfig;
2417 exports.HammerModule = HammerModule;
2418 exports.Meta = Meta;
2419 exports.Title = Title;
2420 exports.TransferState = TransferState;
2421 exports.VERSION = VERSION;
2422 exports.disableDebugTools = disableDebugTools;
2423 exports.enableDebugTools = enableDebugTools;
2424 exports.makeStateKey = makeStateKey;
2425 exports.platformBrowser = platformBrowser;
2426 exports.ɵBROWSER_SANITIZATION_PROVIDERS = BROWSER_SANITIZATION_PROVIDERS;
2427 exports.ɵBROWSER_SANITIZATION_PROVIDERS__POST_R3__ = BROWSER_SANITIZATION_PROVIDERS__POST_R3__;
2428 exports.ɵBrowserDomAdapter = BrowserDomAdapter;
2429 exports.ɵBrowserGetTestability = BrowserGetTestability;
2430 exports.ɵDomEventsPlugin = DomEventsPlugin;
2431 exports.ɵDomRendererFactory2 = DomRendererFactory2;
2432 exports.ɵDomSanitizerImpl = DomSanitizerImpl;
2433 exports.ɵDomSharedStylesHost = DomSharedStylesHost;
2434 exports.ɵELEMENT_PROBE_PROVIDERS = ELEMENT_PROBE_PROVIDERS;
2435 exports.ɵELEMENT_PROBE_PROVIDERS__POST_R3__ = ELEMENT_PROBE_PROVIDERS__POST_R3__;
2436 exports.ɵHAMMER_PROVIDERS__POST_R3__ = HAMMER_PROVIDERS__POST_R3__;
2437 exports.ɵHammerGesturesPlugin = HammerGesturesPlugin;
2438 exports.ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS = INTERNAL_BROWSER_PLATFORM_PROVIDERS;
2439 exports.ɵKeyEventsPlugin = KeyEventsPlugin;
2440 exports.ɵNAMESPACE_URIS = NAMESPACE_URIS;
2441 exports.ɵSharedStylesHost = SharedStylesHost;
2442 exports.ɵTRANSITION_ID = TRANSITION_ID;
2443 exports.ɵangular_packages_platform_browser_platform_browser_a = errorHandler;
2444 exports.ɵangular_packages_platform_browser_platform_browser_b = _document;
2445 exports.ɵangular_packages_platform_browser_platform_browser_c = BROWSER_MODULE_PROVIDERS;
2446 exports.ɵangular_packages_platform_browser_platform_browser_d = createMeta;
2447 exports.ɵangular_packages_platform_browser_platform_browser_e = createTitle;
2448 exports.ɵangular_packages_platform_browser_platform_browser_f = initTransferState;
2449 exports.ɵangular_packages_platform_browser_platform_browser_g = EventManagerPlugin;
2450 exports.ɵangular_packages_platform_browser_platform_browser_h = HAMMER_PROVIDERS__PRE_R3__;
2451 exports.ɵangular_packages_platform_browser_platform_browser_i = HAMMER_PROVIDERS;
2452 exports.ɵangular_packages_platform_browser_platform_browser_j = domSanitizerImplFactory;
2453 exports.ɵangular_packages_platform_browser_platform_browser_k = appInitializerFactory;
2454 exports.ɵangular_packages_platform_browser_platform_browser_l = SERVER_TRANSITION_PROVIDERS;
2455 exports.ɵangular_packages_platform_browser_platform_browser_m = _createNgProbeR2;
2456 exports.ɵangular_packages_platform_browser_platform_browser_n = ELEMENT_PROBE_PROVIDERS__PRE_R3__;
2457 exports.ɵangular_packages_platform_browser_platform_browser_o = GenericBrowserDomAdapter;
2458 exports.ɵescapeHtml = escapeHtml;
2459 exports.ɵflattenStyles = flattenStyles;
2460 exports.ɵinitDomAdapter = initDomAdapter;
2461 exports.ɵshimContentAttribute = shimContentAttribute;
2462 exports.ɵshimHostAttribute = shimHostAttribute;
2463
2464 Object.defineProperty(exports, '__esModule', { value: true });
2465
2466})));
2467//# sourceMappingURL=platform-browser.umd.js.map